tags:

views:

1240

answers:

15

I am relatively new to ruby, and I've been amazed with some of the Gems available. Sinatra comes to mind (one of the simplest ways to create working RESTful interfaces I've ever seen).

So I was wondering, what are some of the coolest or most amazing Gems my fellow programmers have found, that a newbie Ruby guy should look at. Im not looking to solve a specific problem I am having, it more about getting answers to a problem I never knew I had (if you follow my meaning).

What are your suggestions?

+2  A: 

I tend to use ActiveMerchant and Paperclip a lot in my Rails apps.

Jarrod
+6  A: 

I'm of the "don't get it until you need it" philosophy.

That said, there are a couple gems that I keep using:

rampion
Hpricot (and Nokogiri) are fantastic. Definitely my first choice for any HTML scraping/manipulation.
overthink
+7  A: 

Here are some of my favorites:

jpinnix
A: 

fastthread, rails, sinatra, my own gem, rspec all come to mind.

Daniel Huckstep
+1  A: 

I've been using Mechanize a lot lately. It comes in handy more often than you might realize initially. Wirble is also amazing.

Burke
+1  A: 
  • rake
  • autotest (zentest)
  • rspec
  • shoulda
  • cucumber
  • webrat
  • machinist
dylanfm
+5  A: 

Ramaze is ramazing. If you like Sinatra, you may like Ramaze even more. Sinatra gets all the press these days but Ramaze has actually been around longer.

I found Ramaze strange when looking at it... so I'll stick with Sinatra, thanks.
The Wicked Flea
Sure but, out of curiosity, what do you mean by 'strange'?
+2  A: 

The ones the READMEs of the projects you're using tells you to install.

August Lilleaas
+8  A: 
General
  • Rake — This should come pre-installed with rubygems, must have tool
  • DaemonsRun ruby code as a daemon
  • HamlAwesome alternative to raw HTML
  • HpricotHTML parser
  • RdiscountMarkdown parser
  • CapistranoVery nice deployment tool
Testing
  • RspecTesting framework
  • CucumberIntegration testing
  • Factory-girlFixtures replacement
  • Autotest — Runs your tests in the background
Rails plugins
Ashley Williams
+1  A: 
  • rak: search for a string pattern in your code
  • rcov: code coverage statistics for your tests, in nice html
  • flay and flog: to see which parts of your code suck the most
Maximiliano Guzman
A: 
  • shoulda
  • zentest
  • redgreen
  • rcov
  • passenger

and of course:

  • json
Ryan Neufeld
+3  A: 

Sinatra is the simplest way to make a web app with Ruby.

EDIT: Code sample:

require "sinatra"
get '/' do
    "Hello, world!"
end
get '/:name/?' do
    "Hello, #{params[:name]}!"
end

In this case, running your program and then going to / will output Hello, world and /dave, with or without a trailing slash, would output Hello, dave!

Lucas Jones
easier than camping? (haven't used either, yet, so I'm actually curious)
jess
I'm not sure. I can't tell from any of the samples on the site. I'll add a sampling here.
Lucas Jones
+4  A: 

Check out http://ruby-toolbox.com/. They categorize ruby projects and break them down by most watched projects on GitHub. Pretty useful for finding good gems within each problem domain.

Jack Chu
A: 

Friendly_id It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.

Samnang
A: 

[whenever] - define cron tasks in ruby DSL

daeltar