我刚刚将OS X从10.7.5升级到10.9.3。
我做了以下事情:
- 将红宝石升级到2.1.2(并使用它)
- 捆绑安装成功
- 安装postgres,服务器运行。
$rails server -p 5000
工作(服务器运行)
但是,当我这样做时
$rake db:migrate
它给了我以下错误:
rake aborted!
NameError: uninitialized constant AbstractController::Error
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:8:in `<module:AbstractController>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:7:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/rails_323_textarea_fix.rb:1:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/action_view_mods.rb:260:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/template.rb:3:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `block in init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:16:in `block (2 levels) in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:15:in `block in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/bootstrap.rb:76:in `block in <module:Bootstrap>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `public_send'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `method_missing'
/Users/ppd/Academics/Research/git/teapot/config/environment.rb:5:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
我似乎无法在google / SO上找到任何相关信息。我非常感谢你的帮助!
答案 0 :(得分:3)
我还没弄清楚它的细节,但显然哈姆是这里的罪魁祸首。
如果有,请从Gemfile中删除gem 'haml-rails'
,并将其替换为:
gem 'haml', '~> 4.0.0'
然后运行bundle update
并再次启动Rails服务器。