bploetz / versionist

A plugin for versioning Rails based RESTful APIs.
MIT License
971 stars 51 forks source link

Undefined method reload! in RoutesReloader #4

Closed maletor closed 12 years ago

maletor commented 12 years ago
/Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `reload!' for class `Rails::Application::RoutesReloader' (NameError)
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/versionist-0.1.2/lib/versionist/routing.rb:57
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/versionist-0.1.2/lib/versionist/railtie.rb:8
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/initializable.rb:25:in `instance_exec'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/initializable.rb:25:in `run'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/initializable.rb:50:in `run_initializers'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/initializable.rb:49:in `each'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/initializable.rb:49:in `run_initializers'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/application.rb:134:in `initialize!'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/application.rb:77:in `send'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/railties-3.0.12/lib/rails/application.rb:77:in `method_missing'
        from /Users/maletor/Sites/doximity/config/environment.rb:5
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:242:in `require'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:242:in `require'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:597:in `new_constants_in'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:242:in `require'
        from /Users/maletor/Sites/doximity/config.ru:3
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/rack-1.2.5/lib/rack/builder.rb:46:in `instance_eval'
        from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/rack-1.2.5/lib/rack/builder.rb:46:in `initialize'
        from /Users/maletor/Sites/doximity/config.ru:1:in `new'
        from /Users/maletor/Sites/doximity/config.ru:1
maletor commented 12 years ago

Rails 3.0.12

1.8.7 (main):0 > Rails::Application::RoutesReloader
NameError: uninitialized constant Rails::Application::RoutesReloader
from /Users/maletor/.rvm/gems/ree-1.8.7-2012.02/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing'
maletor commented 12 years ago

Might be resolved with wrapping that in a

if RAILS_VERSION > 3.0
  routesreloader
end

since it seems to work on 3.0 without the reload.

bploetz commented 12 years ago

Thanks. The fix for Issue #3 is clearly specific to Rails 3.1+ and not compatible with Rails 3.0. In addition to fixing this specific issue, I will also add Gemfiles and TravisCI configs for all Rails 3.x series releases such that Versionist is tested against all 3.x releases and this doesn't happen again.

Stay tuned.....

bploetz commented 12 years ago

FYI, this is fixed on the master branch if you want to update the dependency on versionist in your Gemfile to point at the git repo for the time being. The tests are failing on Travis for some reason (they work fine locally), so I'm trying to get that squared away before I release a new version. Will let you know when it's released......

maletor commented 12 years ago

Thanks.

bploetz commented 12 years ago

This fix has been released in versionist 0.1.3. Let me know if you run into any other issues. Thanks.