문제

$ 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
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top