no such file to load -- application (MissingSourceFile)

299 views
Skip to first unread message

ryanlives

unread,
May 21, 2009, 2:19:17 PM5/21/09
to Phusion Passenger Discussions
I am a newbie to Rails and this is my first attempt at a Rails
deployment. I used Capistrano and instructions at
http://railstips.org/2008/12/14/deploying-rails-on-dreamhost-with-passenger
to deploy my application, however, I'm getting this error:

"no such file to load -- application (MissingSourceFile)"

You can see the error message at http://gumho.org.

Previously, I got an error message about an undefined method
config.action_view.cache_template_loading and so uncommented that line
in production.rb and now I am stuck with the no such file to load
error message.

What is the explanation for this? I am using Rails 2.3.2. Also, I'm
using mod_rails in conjunction with FastCGI on Dreamhost.

rpheath

unread,
May 21, 2009, 3:01:26 PM5/21/09
to Phusion Passenger Discussions
Well, in Rails 2.3+ (maybe 2.2+) the app/controllers/application.rb is
now referred to as app/controllers/application_controller.rb - maybe
the issue is attributed to that? If Dreamhost doesn't have the latest
version of Rails installed, and you don't have your Rails frozen to
vendor/rails (which you should be doing on a shared host), then Rails
would be looking for application.rb instead of
application_controller.rb, in which case it wouldn't find (hence the
MissingSourceFile error).

To freeze your latest installment of Rails, from your local machine,
do:

$> cd /path/to/your/rails/app
$> rake rails:freeze:gems

That will put a copy of Rails into vendor/rails and then when your app
loads, it won't care what Dreamhost has installed. Then re-deploy and
see if that helps.

On May 21, 2:19 pm, ryanlives <Ryanli...@gmail.com> wrote:
> I am a newbie to Rails and this is my first attempt at a Rails
> deployment. I used Capistrano and instructions athttp://railstips.org/2008/12/14/deploying-rails-on-dreamhost-with-pas...
> to deploy my application, however, I'm getting this error:
>
> "no such file to load -- application (MissingSourceFile)"
>
> You can see the error message athttp://gumho.org.

ryanlives

unread,
May 22, 2009, 12:29:10 AM5/22/09
to Phusion Passenger Discussions
Thanks for the input rpheath. Well, I froze my rails into vendor/rails
and re-deployed but the application came up with a "We're sorry, but
something went wrong" message. I checked server logs but there was no
reports. Also, production.rb has nothing written to it.

Is Capistrano the best route I should be using? Are there any good
resources for rails deployment out there?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages