Re: [phusion-passenger] Rails3 application, but wrongly detected as a Rails1 or Rails2 application

1,614 views
Skip to first unread message

Hongli Lai

unread,
Jan 13, 2013, 6:10:15 AM1/13/13
to phusion-...@googlegroups.com
Do you have a 'RailsBaseURI /' directive in your Apache config? That
forces Phusion Passenger to detect the app as a Rails 1 or 2 app, so
please remove it to allow proper autodetection.

On Sun, Jan 13, 2013 at 6:12 AM, ca <chandan...@gmail.com> wrote:
> I am getting the following error when I run the latest code in github. The
> application was running fine when running Passenger 3.0.18, but am getting
> this error when I update to the latest in github. Application is a ruby on
> rails application running on Apache 2.2.21 + Passenger, on Mac OS X 10.7.4.
>
>
> [ pid=211 thr=0x1017ab000
> file=ext/common/agents/HelperAgent/RequestHandler.h:1753 time=2013-01-12
> 20:27:47.7669 ]: [Client 28] Cannot checkout session. An error occured while
> starting up the preloader.
> Error page:
> This application is a Rails 3 application, but it was wrongly detected as a
> Rails 1 or Rails 2 application. This is probably a bug in Phusion Passenger,
> so please report it.
> !> Error
> !>
> exit (SystemExit)
>
> /Users/local/Desktop/passenger/helper-scripts/classic-rails-preloader.rb:79:in
> `exit'
>
> /Users/local/Desktop/passenger/helper-scripts/classic-rails-preloader.rb:79:in
> `preload_app'
>
> /Users/local/Desktop/passenger/helper-scripts/classic-rails-preloader.rb:156
>
> --
> You received this message because you are subscribed to the Google Groups
> "Phusion Passenger Discussions" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/phusion-passenger/-/_VoplXeFfZMJ.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to
> phusion-passen...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/phusion-passenger?hl=en.



--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

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

ca

unread,
Jan 13, 2013, 1:31:29 PM1/13/13
to phusion-...@googlegroups.com
Hongli - 

I do NOT see any RailsBaseURI in my config. Here is my passenger config:

LoadModule passenger_module /Users/local/Desktop/passenger/libout/apache2/mod_passenger.so
PassengerRoot /Users/local/Desktop/passenger
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
PassengerUseGlobalQueue On
PassengerPoolIdleTime 60
PassengerMaxPoolSize 20
RailsFrameworkSpawnerIdleTime 0
RailsAppSpawnerIdleTime 0
RailsSpawnMethod smart
PassengerLogLevel 1
PassengerDefaultUser local
PassengerDefaultGroup staff

Hongli Lai

unread,
Jan 13, 2013, 4:25:26 PM1/13/13
to phusion-...@googlegroups.com
On Sun, Jan 13, 2013 at 7:31 PM, ca <chandan...@gmail.com> wrote:
> Hongli -
>
> I do NOT see any RailsBaseURI in my config. Here is my passenger config:

Well in that case: does your application root contain a 'config.ru'?
Phusion Passenger autodetects the application type as follows:

1. If config.ru exists: it is a Rack or Rails 3 app
2. If not, and config/environment.rb exists: it is a Rails 1 or Rails 2 app
3. If not, there is no app and the request should be handled by the web server

ca

unread,
Jan 18, 2013, 2:45:52 AM1/18/13
to phusion-...@googlegroups.com
Hongli - In my case, I have config.ru at the root of the app AND config/environment.rb exists. 
Is this why I'm running into this issue? Any work around? 

Gurvan Le Dromaguet

unread,
May 15, 2013, 8:13:41 AM5/15/13
to phusion-...@googlegroups.com
Had the same problem, found a ticket in bug tracker with working workaround at:

https://code.google.com/p/phusion-passenger/issues/detail?can=2&start=0&num=100&q=wrongly%20detected&colspec=ID%20Type%20Status%20Priority%20Milestone%20Stars%20Summary&groupby=&sort=&id=882

change RailsBaseURI to RackBaseURI in your apache2 config 

Najam Farooq Alvi

unread,
Feb 11, 2015, 7:31:19 AM2/11/15
to

1. If config.ru exists: it is a Rack or Rails 3 app


Thanks  Hongli Li, 

I spent few hours to find a solution for redmine showing index of problem and only found it over here. Config.ru was missing in my base redmine folder. 
 
Reply all
Reply to author
Forward
0 new messages