我嘗試運行Rails應用程序,但我得到以下的輸出:啓動困難一個Rails應用程序
ruby script/server
=> Booting Mongrel
=> Rails 2.3.4 application starting on http://0.0.0.0:3000
/home/umar/.rvm/gems/ruby-1.8.6-head/gems/rails-2.3.4/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/home/umar/.rvm/gems/ruby-1.8.6-head/gems/haml-2.0.0/lib/haml/helpers/action_view_mods.rb:46:in `alias_method': undefined method `capture_erb_with_buffer' for module `ActionView::Helpers::CaptureHelper' (NameError)
from /home/umar/.rvm/gems/ruby-1.8.6-head/gems/haml-2.0.0/lib/haml/helpers/action_view_mods.rb:46
from /home/umar/.rvm/rubies/ruby-1.8.6-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /home/umar/.rvm/rubies/ruby-1.8.6-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/umar/.rvm/gems/ruby-1.8.6-head/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from /home/umar/.rvm/gems/ruby-1.8.6-head/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/umar/.rvm/gems/ruby-1.8.6-head/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from /home/umar/.rvm/gems/ruby-1.8.6-head/gems/haml-2.0.0/lib/haml/helpers.rb:1
from /home/umar/.rvm/rubies/ruby-1.8.6-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
... 34 levels...
from /home/umar/.rvm/gems/ruby-1.8.6-head/gems/rails-2.3.4/lib/commands/server.rb:84
from /home/umar/.rvm/rubies/ruby-1.8.6-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /home/umar/.rvm/rubies/ruby-1.8.6-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
這裏是我的寶石list命令的輸出:
gem list
*** LOCAL GEMS ***
actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activerecord-jdbc-adapter (1.1.1)
activerecord-jdbcmysql-adapter (1.1.1)
activeresource (2.3.4)
activesupport (2.3.4)
builder (3.0.0)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.3)
fastthread (1.0.7)
gem_plugin (0.2.3)
haml (2.0.0)
jdbc-mysql (5.1.13)
mongrel (1.1.5)
rack (1.0.1)
rails (2.3.4)
rake (0.8.7)
rspec (1.3.1)
rspec-rails (1.3.3)
will_paginate (2.2.2)
和我的gem -v是1.3.7
我該如何解決這個錯誤?
我不熟悉哈姆,但它似乎是錯誤的根源。是2.0.0的最新版本?你有沒有證實它與Rails 2.3.4兼容? – Wukerplank 2011-05-04 12:54:39
@DGM實際的問題是低於不贊成的警告:「未定義的方法'capture_erb_with_buffer'模塊'ActionView :: Helpers :: CaptureHelper'」 – rubiii 2011-05-04 12:58:05
哎呀,錯過了!忽略緊密的建議! – DGM 2011-05-04 13:00:09