Mikey Hogarth
Mikey Hogarth

Reputation: 4712

Getting newer gems

I'm really just a beginner to ruby, so hopefully this is an easy one. I've got to the point where I'm starting to look into some of the gems that the community have put together. I decided to check out something that would help my application consume rss feeds. So, headed over to rubygems (which is where i thought people go to get these kinds of things) and searched for rss. I found this one;

http://rubygems.org/gems/simple-rss

instructions were to just install the gem with

gem install simple-rss

So far, so good. When i came to actually use the gem, the documentation I received from doing the above was a bit naff, so i searched a bit further and found the git repo;

https://github.com/cardmagic/simple-rss

The documentation there (their code examples) complain about missing methods etc. and after a bit of digging I came to the conclusion that I must have downloaded an older version of the gem than the git trunk.

So, my question is, should I be using rubygems to get the latest gems, and if not, what other resources are out there to help find the latest builds of the comminities gems?

Upvotes: 0

Views: 61

Answers (2)

Max Chernyak
Max Chernyak

Reputation: 37375

As far as finding a good gem for a task — use Ruby Toolbox, since it also shows you how actively maintained a gem is. Here's, for example, a section on feed parsing.

If you want to get the latest gem code that hasn't been released yet, you could download the code directly from github and build the gem yourself. However, it's easier to use bundler for that. It allows you to create a Gemfile for your project looking something like the following.

gem 'simple_rss', :git => "git://github.com/cardmagic/simple-rss.git"

Then run bundle command to download and build these gems from their corresponding sources.

In general, bundler is a great solution for managing gem dependencies for any ruby project. It provides ways to quickly reference any released gems, automatically builds gems directly from a git source, git refs, or paths on your filesystem, and has other convenient features.

Upvotes: 2

Marek Příhoda
Marek Příhoda

Reputation: 11198

By far the best place for all things Ruby & Ruby on Rails for the devs is the Ruby Toolbox

Upvotes: 2

Related Questions