我的ruby应用程序出了什么问题?

时间:2010-03-11 22:26:42

标签: ruby passenger

我正在将一些网站迁移到另一台服务器。其中一个网站是使用Ruby Enterprise Edition和Passenger构建的。我正在尝试让网站在Ubuntu 9.10,Apache 2和mysql 5上运行。我以前从未在rails上使用ruby或ruby。

当我访问使用ruby构建的网站时,我收到错误消息。我附上了一个错误日志的副本,显示在这个问题的最后。任何人都可以猜到我的安装可能出现什么问题以及如何解决它?

这些是可能的原因:

*
There may be a syntax error in the application's code. Please check for such errors and fix them.
*
A required library may not installed. Please install all libraries that this application requires.
*
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
*
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.

Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
undefined method `register_template_handler' for ActionView::Base:Class (NoMethodError)
Exception class:
PhusionPassenger::UnknownError
Application root:
/var/www/current 
Backtrace:
#   File    Line    Location
0   /var/www/current/vendor/plugins/markaby/init.rb     6   in `evaluate_init_rb'
1   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb   158     in `evaluate_init_rb'
2   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb   11  in `silence_warnings'
3   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb   154     in `evaluate_init_rb'
4   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb   48  in `load'
5   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb    38  in `load_plugins'
6   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb    37  in `each'
7   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb    37  in `load_plugins'
8   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb    369     in `load_plugins'
9   /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb    165     in `process'
10  /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb    113     in `send'
11  /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb    113     in `run'
12  /var/www/current/config/environment.rb  10  
13  /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
14  /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb    31  in `require'
15  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb   303     in `preload_application'
16  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb   252     in `initialize_server'
17  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/utils.rb   255     in `report_app_init_status'
18  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb   237     in `initialize_server'
19  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb     194     in `start_synchronously'
20  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb     163     in `start'
21  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb   213     in `start'
22  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb   262     in `spawn_rails_application'
23  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb  126     in `lookup_or_add'
24  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb   256     in `spawn_rails_application'
25  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb  80  in `synchronize'
26  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb  79  in `synchronize'
27  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb   255     in `spawn_rails_application'
28  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb   154     in `spawn_application'
29  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb   287     in `handle_spawn_application'
30  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb     352     in `__send__'
31  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb     352     in `main_loop'
32  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb     196     in `start_synchronously'
33  /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/bin/passenger-spawn-server   61  

2 个答案:

答案 0 :(得分:1)

我必须确保安装了所有正确的宝石,这意味着它们必须都是正确的版本,其中很多都是旧的。

答案 1 :(得分:0)

undefined method `register_template_handler' for ActionView::Base:Class (NoMethodError)

快速谷歌'register_template_handler'给出了这个:https://rails.lighthouseapp.com/projects/8994/tickets/187-actionview-register_template_handler-missing-in-2-1-rc-1和此http://www.redmine.org/boards/2/topics/3376以及此http://www.tsfsc.com/blog/