Reputation: 5248
I am attempting to run my rails app using Passenger and Apache. As far as I know I followed the instructions here correctly: http://www.modrails.com/documentation/Users%20guide%20Apache.html
When I have an index.html file present in my /public directory the url serves that page. To not use the index.html file I deleted it, created a new controller which created a new view, among other things, under /app/views/home/index.html.erb. In my routes.rb file I have: root :to => "home#index"
When I have done this in the past, using just the build in rails server or running the app using thin everything has always played nice and it serves the erb file the route points to. Under passenger, however, as soon as I remove index.html from public I get the following and I'm not sure how to fix it:
[ pid=24427 thr=78414880 file=utils.rb:176 time=2012-01-18 14:55:17.386 ]: *** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find factory_girl-2.4.2 in any of the sources (Bundler::GemNotFound)) (process 24427, thread #<Thread:0x9590840>):
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/spec_set.rb:88:in `block in materialize'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/spec_set.rb:82:in `map!'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/spec_set.rb:82:in `materialize'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/definition.rb:135:in `specs_for'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/definition.rb:124:in `requested_specs'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/environment.rb:23:in `requested_specs'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler/runtime.rb:11:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/utils.rb:326:in `prepare_app_process'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:156:in `block in initialize_server'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/utils.rb:572:in `report_app_init_status'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:154:in `initialize_server'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:204:in `start_synchronously'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:180:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
from <internal:prelude>:10:in `synchronize'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/helper-scripts/passenger-spawn-server:99:in `<main>'
This is what I have configured Apache with:
<VirtualHost *:9090>
ServerName my.server.name:9090
DocumentRoot /var/www/app_dir/public
<Directory /var/www/app_dir/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
Upvotes: 0
Views: 1906
Reputation: 5248
Found a solution right here on SO, it wasn't a routing error after all. https://stackoverflow.com/a/5921024/551736
Upvotes: 1