Hi Folks,

I'm having trouble using the oauth gem in rails apps. I think this may
be me not understanding how to load it with Bundler, and I would love
any feedback to guide me donw the right path.

I'm using Ruby 1.9.2 and Rails 3.0.3. I did a gem install oauth; I
also tried a bundle install oauth, but no luck. If I include a line:

require 'oauth'

in a controller, I get a LoadError: no such file to load -- oauth.

In irb, I have no problem with oauth:

ruby-1.9.2-p136 :001 > require 'rubygems'
 => true
ruby-1.9.2-p136 :002 > require 'oauth'
 => true
ruby-1.9.2-p136 :003 > OAuth::Consumer
 => OAuth::Consumer

In the rails console, no luck:

ruby-1.9.2-p136 :001 > OAuth::Consumer
NameError: uninitialized constant OAuth
        from (irb):1
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
railties-3.0.3/lib/rails/commands/console.rb:44:in `start'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
railties-3.0.3/lib/rails/commands/console.rb:8:in `start'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
railties-3.0.3/lib/rails/commands.rb:23:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'
ruby-1.9.2-p136 :002 > require 'oauth'
LoadError: no such file to load -- oauth
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block
in require'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `block
in load_dependency'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:596:in
`new_constants_in'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
`load_dependency'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require'
        from (irb):2
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
railties-3.0.3/lib/rails/commands/console.rb:44:in `start'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
railties-3.0.3/lib/rails/commands/console.rb:8:in `start'
        from /Users/acataldo/mentors/oauth-plugin/ruby/1.9.1/gems/
railties-3.0.3/lib/rails/commands.rb:23:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

Any advice on how to get rails to notice oauth?

Thanks!
Adam Cataldo

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to