Rails 3 app won't start on Passenger 3

2,285 views
Skip to first unread message

Andrew

unread,
Oct 18, 2010, 11:57:46 PM10/18/10
to Phusion Passenger Discussions
I just upgraded to Passenger 3 and tried to start my Rails 3 app on my
production machine (Ubuntu) (it works on on my dev machine). It just
says "no such file to load --application" but I double checked to see
that all the files are there and all the gems are installed.

The only related problems to this I've found has to do with rvm, which
I am not using. Any ideas?

jimmy

unread,
Oct 19, 2010, 4:34:28 AM10/19/10
to Phusion Passenger Discussions
Just for the record I am currently experiencing the same issue on a
fresh install of passenger 3, rails 3 on a fresh rails site. It also
complains about rails_root is already defined. I believe the 2 may be
related. I am using the latest ruby enterprise 1.8.7.

jstemmer

unread,
Oct 19, 2010, 4:08:50 PM10/19/10
to Phusion Passenger Discussions
Same problem here, using a fresh install of passenger3, latest rvm,
ree 1.8.7, rails 3.0.1 and apache2 on ubuntu 10.10

This problem only occurs when I use RailsBaseURI in my apache config.
If I point the DocumentRoot directly to the app's public directory
everything seem to be working just fine.

You can find my apache config and the error.log: http://gist.github.com/634945

jimmy

unread,
Oct 20, 2010, 9:51:51 AM10/20/10
to Phusion Passenger Discussions
Confirmed issue as above, it only happens when I use RailsBaseURI
which is required because I run a webhost with some php and some rails
sites so we have railsautodetect turned off. Surely this is a bug? Any
help or way to raise this further??

Andrew

unread,
Oct 20, 2010, 11:38:12 AM10/20/10
to Phusion Passenger Discussions
Interesting, I am using RailsBaseURI as well! I'll turn it off later
today and see if that fixes it. Thanks for the help everyone.

Hongli Lai

unread,
Oct 20, 2010, 6:50:53 PM10/20/10
to phusion-...@googlegroups.com
If your app is Rails 3 then you should use RackBaseURI, not
RailsBaseURI. RailsBaseURI is for Rails 1 and Rails 2 apps.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

jimmy

unread,
Oct 21, 2010, 8:47:43 AM10/21/10
to Phusion Passenger Discussions
Hi,

Thanks Hongli ! that worked great and solved my issue... I will have
to read up and understand Rack based apps better and the changes in
rails 3.

germans_in_the_town

unread,
Nov 4, 2010, 10:44:09 AM11/4/10
to Phusion Passenger Discussions
rails -v
3.0.1

ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

I just upgraded my passenger's nginx module from 2.2.15 to 3.0.0 and
get the same error:

no such file to load --application

0 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
activesupport-3.0.0/lib/active_support/dependencies.rb 304 in
`depend_on'
1 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
activesupport-3.0.0/lib/active_support/dependencies.rb 216 in
`require_dependency'
2 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/classic_rails/
application_spawner.rb 250 in `preload_application'
3 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/classic_rails/
application_spawner.rb 181 in `initialize_server'
4 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/utils.rb 564 in
`report_app_init_status'
5 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/classic_rails/
application_spawner.rb 174 in `initialize_server'
6 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server.rb 204 in
`start_synchronously'
7 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server.rb 180 in
`start'
8 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/classic_rails/
application_spawner.rb 149 in `start'
9 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb 219 in
`spawn_rails_application'
10 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb
132 in `lookup_or_add'
11 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb 214 in
`spawn_rails_application'
12 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb
82 in `synchronize'
13 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb
79 in `synchronize'
14 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb 213 in
`spawn_rails_application'
15 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb 132 in
`spawn_application'
16 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb 275 in
`handle_spawn_application'
17 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server.rb 357 in
`__send__'
18 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server.rb 357 in
`server_main_loop'
19 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/lib/phusion_passenger/abstract_server.rb 206 in
`start_synchronously'
20 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
passenger-3.0.0/helper-scripts/passenger-spawn-server

Just a notice.

Thanks,
Dmitrii Samoilov


On Oct 21, 12:50 am, Hongli Lai <hon...@phusion.nl> wrote:
> If your app is Rails 3 then you should use RackBaseURI, not
> RailsBaseURI. RailsBaseURI is for Rails 1 and Rails 2 apps.
>
> On Wed, Oct 20, 2010 at 5:38 PM, Andrew <luckyd...@gmail.com> wrote:
> > Interesting, I am using RailsBaseURI as well! I'll turn it off later
> > today and see if that fixes it. Thanks for the help everyone.
>
> > On Oct 20, 6:51 am, jimmy <rallyr...@gmail.com> wrote:
> >> Confirmed issue as above, it only happens when I use RailsBaseURI
> >> which is required because I run a webhost with some php and some rails
> >> sites so we have railsautodetect turned off. Surely this is a bug? Any
> >> help or way to raise this further??
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

bobo

unread,
Nov 4, 2010, 2:09:26 PM11/4/10
to Phusion Passenger Discussions
Hi,
had exactly the same problem with one application, another one is
fine. Was not using RailsBaseURI, documentroot was correct.

Turned out to be a missing config.ru file in the rails root directory,
didn't seem to affect earlier versions of passenger.

Just in case it helps anyone

cheerio

At a loss to understand why one will not start:

On Nov 4, 2:44 pm, germans_in_the_town <germaninthet...@gmail.com>
wrote:

germans_in_the_town

unread,
Nov 5, 2010, 9:48:00 AM11/5/10
to Phusion Passenger Discussions
thank you very much, bobo

now all works like a charm!

Bryce Boe

unread,
Jun 24, 2011, 7:28:17 PM6/24/11
to phusion-...@googlegroups.com
After a few hours I finally found this thread. It would be great if you could add a mention in the RailBaseURI documentation that Rails3 should use the RackBaseURL as that would probably save a number of people some time.

-Bryce
Reply all
Reply to author
Forward
0 new messages