lundi 28 septembre 2015

Uninitialized Constant error (inside helper folder) after upgrading to Ruby 2.2.3 with RVM

I just upgraded from Ruby 1.9.3 to Ruby 2.2.3 using RVM and started getting the following output when I attempt to run 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>'

This error seems to happen only within the folder helpers/platform. I thought this might be an issue with the module being under a namespace but I have other modules that are inside the helpers folder and work under a namespace that don't show the same error.

I am not sure if this is related to some configuration missing or maybe incompatibility with some of my gems. I don't know exactly how to proceed from this so maybe someone can help me to figure where should I be looking at? Do I need to provide more information?

Ruby 2.2.3 - Rails 3.2.22 - OS X Yosemite 10.10.4

Aucun commentaire:

Enregistrer un commentaire