Updating a gem?

10,077

Solution 1

The commit you are linking to seems to be a documentation change only so getting it wouldn't probably help much. If you want to link to the latest git version of a gem you can put something like this in your gemfile:

gem "twitter", :git => "git://github.com/jnunemaker/twitter.git"

If you want to change a piece of the code just fork the repo on twitter and link to your own instead locally or on github.

Update: nowadays it is also possible to have a github reference in the gemfile:

gem "twitter", :github => "jnunemaker/twitter"

Solution 2

As Pablo Fernandez noted, the commit you linked changed nothing, just a comment. Also, just because there's a commit, it does not mean that there's a new gem version released. You can try to switch your dependency on the Gemfile to the "live" version, though:

gem "twitter", :git => "git://github.com/jnunemaker/twitter.git"
Share:
10,077
Slick23
Author by

Slick23

Updated on June 04, 2022

Comments

  • Slick23
    Slick23 almost 2 years

    I'm using the twitter gem and it has a mistake in one the methods -- Twitter requires authentication and this method was set for fals for authentication. It seems someone fixed it with this commit ver recently:

    https://github.com/jnunemaker/twitter/commit/4483ad062c5dd65b4adb13fb8da5efdaf550f35a#

    But, when I use the method -- I still get an error:

    Twitter::Unauthorized: GET https://api.twitter.com/1/statuses/retweets/{id}.json: 401: Could not authenticate you.
    

    I tried updating the gem.

    gem update twitter
    Updating installed gems
    Nothing to update
    

    I tried also, updating the bundle, but no luck. So, I'm not sure how to get the new code into my bundle so it uses the method with authentication?

  • Slick23
    Slick23 almost 13 years
    Yeah, I noticed that. Not sure why they'd change just the documentation and not the method itself.
  • Slick23
    Slick23 almost 13 years
    I tried that and go all kinds of errors when trying to run IRB or the server. Not sure what broke exactly, something with one of the dependencies.
  • Slick23
    Slick23 almost 13 years
    solved that problem. Looks like faraday and omniauth (which I'm also using) didn't play nice together. Updating omniauth fixed it.
  • Alex Jones
    Alex Jones almost 13 years
    @Final if that's it then accept any answer so this question can be properly resolved