Question

$ rails g twitter_auth
/Library/Ruby/Gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require': no such file to load -- twitter_auth/engine (LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
    ...

Anyone know what I might be missing? I thought this was straight forward.

#Gemfile
gem "twitter-auth", :require => "twitter_auth/engine"

then :

bundle install
Was it helpful?

Solution

It looks like you're probably trying to use one of the forks of twitter-auth (perhaps trotter's fork or jaikoo's fork?). Both look like they have slightly misleading readmes because they suggest you can install from rubygems. However, the gem 'twitter-auth' is the main branch of the plugin, by mbleigh which doesn't work with Rails 3 yet by the looks of it.

If you're wanting to use one of these forks which work with Rails 3, you need to specify their git repo in your Gemfile. For example, for jaikoo's fork:

gem "twitter-auth", :git => "git://github.com/jaikoo/twitter-auth.git", :branch => "rails_3", :require => "twitter_auth/engine"

Then rails g twitter_auth should work as expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top