oauth-plugin icon indicating copy to clipboard operation
oauth-plugin copied to clipboard

Rails 2.0.2 generate oauth_consumer gives errors

Open amnwebmaster opened this issue 14 years ago • 1 comments

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:inconst_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

amnwebmaster avatar Jan 20 '11 00:01 amnwebmaster

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

Kimtaro avatar Jan 21 '11 06:01 Kimtaro