oauth-plugin
oauth-plugin copied to clipboard
Rails 2.0.2 generate oauth_consumer gives errors
On Rails 2.0.2 & Ruby 1.8.7
running script/generate oauth_consumer give the error
/vendor/plugins/oauth-plugin/lib/oauth-plugin.rb:6: undefined method `version' for Rails:Module (NoMethodError)
Removing the rails 3 version check, running the script again then gives
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:263:in load_missing_constant': uninitialized constant Rails::Railtie (NameError) vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in
const_missing'
from /u/apps/netadventist3/current/vendor/plugins/oauth-plugin/lib/oauth-plugin.rb:16
Unfortunately the app I'm extending has Rails 2.0.2 frozen in
You need to add one extra condition for rails 3, not remove the check. I ran into the same problem and solved it with this patch: https://github.com/pelle/oauth-plugin/issues#issue/36
Cheers Kim