部署rails应用程序时收到以下错误。这是什么意思,我该如何解决?该应用程序在我的本地计算机上运行唯一的区别是我的本地机器上没有乘客。
无法启动Ruby(Rack)应用程序。
缺少应用程序所需的源文件。
您可能无法正确上传应用程序文件。请检查是否上传了所有应用程序文件。
可能未安装所需的库。请安装此应用程序所需的所有库。
有关错误的更多信息可能已写入应用程序的日志文件。请检查它以分析问题。
错误讯息: 无法加载此类文件 - URI
异常类: LoadError
应用程序根目录: /家庭/ autobrain / Autobrain
Backtrace:
# File Line Location
0 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 251 in `require'
1 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 251 in `block in require'
2 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 236 in `load_dependency'
3 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 251 in `require'
4 /home/autobrain/Autobrain/config/initializers/PrgRails.rb 6 in `'
5 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 245 in `load'
6 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 245 in `block in load'
7 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 236 in `load_dependency'
8 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb 245 in `load'
9 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb 588 in `block (2 levels) in '
10 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb 587 in `each'
11 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb 587 in `block in '
12 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb 30 in `instance_exec'
13 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb 30 in `run'
14 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb 55 in `block in run_initializers'
15 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb 54 in `each'
16 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb 54 in `run_initializers'
17 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb 136 in `initialize!'
18 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb 30 in `method_missing'
19 /home/autobrain/Autobrain/config/environment.rb 5 in `'
20 config.ru 3 in `require'
21 config.ru 3 in `block in
'
22 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb 51 in `instance_eval'
23 /home/autobrain/Autobrain/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb 51 in `initialize'
24 config.ru 1 in `new'
25 config.ru 1 in `
'
26 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 225 in `eval'
27 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 225 in `load_rack_app'
28 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 157 in `block in initialize_server'
29 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb 572 in `report_app_init_status'
30 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 154 in `initialize_server'
31 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously'
32 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 180 in `start'
33 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 129 in `start'
34 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application'
35 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'
36 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application'
37 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize'
38 prelude> 10:in `synchronize'
39 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
40 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application'
41 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application'
42 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
43 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop'
44 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously'
45 /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/helper-scripts/passenger-spawn-server 99 in `
'
答案 0 :(得分:0)
在Apache上,尝试通过在.conf文件中添加此乘客指令来设置环境,如下所示:
RailsEnv development
然后重启apache!