使用RVM升级到Ruby 2.2.3后,未初始化的常量错误(在帮助文件夹内)

时间:2015-09-28 21:47:45

标签: ruby-on-rails ruby ruby-on-rails-3 ruby-2.2

我刚刚使用RVM从Ruby 1.9.3升级到2.2.3,并在尝试运行rails server时开始获得以下输出:

/Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/activesupport-3.2.22/lib/active_support/inflector/methods.rb:230:in `block in constantize': uninitialized constant Platform::AddressesHelper (NameError)
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/activesupport-3.2.22/lib/active_support/inflector/methods.rb:229:in `each'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/activesupport-3.2.22/lib/active_support/inflector/methods.rb:229:in `constantize'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/activesupport-3.2.22/lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/actionpack-3.2.22/lib/abstract_controller/helpers.rb:136:in `block in modules_for_helpers'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/actionpack-3.2.22/lib/abstract_controller/helpers.rb:131:in `map!'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/actionpack-3.2.22/lib/abstract_controller/helpers.rb:131:in `modules_for_helpers'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/actionpack-3.2.22/lib/action_controller/metal/helpers.rb:92:in `modules_for_helpers'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/actionpack-3.2.22/lib/abstract_controller/helpers.rb:95:in `helper'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/actionpack-3.2.22/lib/action_controller/railties/paths.rb:18:in `block (2 levels) in with'
from /Users/nathalia/workspace/my_app/app/controllers/application_controller.rb:2:in `<top (required)>'
from /Users/nathalia/workspace/my_app/app/controllers/admin_controller.rb:2:in `<top (required)>'
from /Users/nathalia/workspace/my_app/app/controllers/admin/aee_activities_controller.rb:2:in `<top (required)>'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:444:in `block (2 levels) in eager_load!'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:443:in `each'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:443:in `block in eager_load!'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:441:in `each'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:441:in `eager_load!'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/nathalia/workspace/my_app/config/initializers/paper_trail_ext.rb:86:in `<module:PaperTrail>'
from /Users/nathalia/workspace/my_app/config/initializers/paper_trail_ext.rb:15:in `<top (required)>'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:592:in `each'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `run'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `each'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/application.rb:136:in `initialize!'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/nathalia/workspace/my_app/config/environment.rb:6:in `<top (required)>'
from /Users/nathalia/workspace/my_app/config.ru:3:in `block in <main>'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /Users/nathalia/workspace/my_app/config.ru:in `new'
from /Users/nathalia/workspace/my_app/config.ru:in `<main>'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/commands/server.rb:46:in `app'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/commands/server.rb:70:in `start'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/commands.rb:50:in `tap'
from /Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/gems/railties-3.2.22/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

此错误似乎只发生在“helpers / platform”文件夹中。我认为这可能是模块位于命名空间下的问题,但是我有其他模块位于helpers文件夹中,并且在命名空间下工作,但没有显示相同的错误。

我不确定这是否与某些配置缺失或可能与我的某些宝石不兼容有关。我不确切知道如何从这个开始,所以也许有人可以帮我弄清楚我应该在哪里看?我需要提供更多信息吗?

我正在使用:

  • Ruby 2.2.3
  • Rails 3.2.22
  • OS X Yosemite 10.10.4

更新 - 输出rvm信息:

   ruby-2.2.3@my_app:

  system:
    uname:       "Darwin Embu.local 14.4.0 Darwin Kernel 
    Version 14.4.0: Thu May 28 11:35:04 PDT 2015; 
    root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.10/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.57(1)-release 
    (x86_64-apple-darwin14)"
    zsh:         "/bin/zsh => zsh 5.0.5 (x86_64-apple-darwin14.0)"

  rvm:
    version:      "rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, 
    Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "22 hours 26 minutes 56 seconds ago"
    path:         "/Users/nathalia/.rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.2.3p173"
    date:         "2015-08-18"
    platform:     "x86_64-darwin14"
    patchlevel:   "2015-08-18 revision 51636"
    full_version: "ruby 2.2.3p173 (2015-08-18 revision 51636) 
    [x86_64-darwin14]"

  homes:
    gem:          "/Users/nathalia/.rvm/gems/ruby-2.2.3@my_app"
    ruby:         "/Users/nathalia/.rvm/rubies/ruby-2.2.3"

  binaries:
    ruby:         "/Users/nathalia/.rvm/rubies/ruby-2.2.3/bin/ruby"
    irb:          "/Users/nathalia/.rvm/rubies/ruby-2.2.3/bin/irb"
    gem:          "/Users/nathalia/.rvm/rubies/ruby-2.2.3/bin/gem"
    rake:         "/Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/bin/rake"

  environment:
    PATH:         "/Users/nathalia/.rvm/gems/ruby-2.2.3@my_app/bin:/Users/nathalia/.rvm/gems/ruby-2.2.3@global/bin:/Users/nathalia/.rvm/rubies/ruby-2.2.3/bin:/Users/nathalia/.rvm/bin:/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
    GEM_HOME:     "/Users/nathalia/.rvm/gems/ruby-2.2.3@my_app"
    GEM_PATH:     "/Users/nathalia/.rvm/gems/ruby-2.2.3@my_app:/Users/nathalia/.rvm/gems/ruby-2.2.3@global"
    MY_RUBY_HOME: "/Users/nathalia/.rvm/rubies/ruby-2.2.3"
    IRBRC:        "/Users/nathalia/.rvm/rubies/ruby-2.2.3/.irbrc"
    RUBYOPT:      ""
    gemset:       "my_app"

0 个答案:

没有答案