The use of gems in rails - the result "gemname" in "No file" is required

I try to use the twitter_oauth gemstone with my rails application, but whenever I have it require 'twitter_oauth', I get the error "There is no such file to download."

I have already listed the twitter_oauth stone in my Gemfile, and when I try to initiate a new Client instance in the rails console, it works fine even if I don't enter it the first time require 'twitter_oauth'. I even made a test ruby ​​file where all he had was:

require 'twitter_oauth'

client = TwitterOAuth::Client.new
if client != nil
  puts "It worked!"
else
  puts "It did not work"
end

And working with this file also worked.

I tried to put the required "rubygems", and I tried to put the required twitter_oauth code in the config / application.rb file.

, "will_paginate" ( rails, rails irb).

, , irb, "twitter_oauth" , , , .

+3
1

3, Gemfile, "rails console" " rails", "irb". , ? , "twitter_oath" , "twitter_oauth"...

? , :

$ sudo gem install rubygems-update
$ sudo gem update --system
$ sudo gem update

3? ?

+1

All Articles