2012-01-18 53 views
0

我試圖使用Passenger和Apache來運行我的rails應用程序。據我所知,我正確地按照這裏的說明:http://www.modrails.com/documentation/Users%20guide%20Apache.html不與Passenger一起工作的路線(Bundler :: GemNotFound)

當我有一個index.html文件出現在我的/ public目錄中的URL服務該頁面。爲了不使用index.html文件,我刪除了它,創建了一個新的控制器,該控制器在/app/views/home/index.html.erb下創建了一個新視圖。在我的routes.rb文件中,我有:root :to => "home#index"

當我在過去完成此項工作時,只使用rails服務器中的構建或使用thin應用程序運行應用程序一直很好,它爲erb文件提供路由點至。在乘客,但是,只要我從公共我得到以下刪除index.html,然後我不知道如何解決它:

[ 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>' 

這就是我與配置了Apache:

<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> 

回答

相關問題