My favourite mixin

Top Ruby gems I use

Maria Niță
Life @ OPW

--

As a beginner in Ruby/Rails I tried to write everything, but growing up meant solving more complex problems, hence reusability was the answer.

I want to present some of the gems which are present in most of my Ruby projects.

  1. Rails — the best web framework for Ruby. Rails was the reason I learnt Ruby, it’s like a genie in a bottle for web.
  2. Devise — authentication made easy. Almost all web apps require an auth system, with Devise it takes a few minutes to configure and has more features than you may need.
  3. Rspec — TDD it’s one of the most recommended development methodologies. Testing is transformed to storytelling with Rspec.
  4. Factory Girl — dummy data made smart. Factories help you describe data for testing and development based on your models, which are easy to maintain and declare. Say no to old style fixtures.
  5. Bootstrap — I think that it doesn’t need a description. Rails-Bootstrap is my favourite gem, I had fewer configuration problems and it’s up to date with the official releases.
  6. Rake — make tasks for Ruby. You are a Rakefile away from transforming common and repetitive commands into easy to use tasks.
  7. OmniAuth and OmniAuth2— the most popular authorization protocol is represented by these small gems, which are integrated in gems like Devise.
  8. Koala — integration with Facebook API. Login via Facebook is a minimum requirement for a social app. For Twitter you can try twitter.
  9. Rails Admin — a database interface for non-developers and developers. Even if it’s the second most popular, I had fewer problems and frustrations configuring and customizing this administration panel.
  10. Heroku Toolbelt — Heroku is very friendly to Rails apps, and it has a very generous free plan. It’s not actually a gem, but it’s a very important layer of an application.

I didn’t include gems for different databases support, CoffeeScript or other built in gems of Rails. But I have to recommend CoffeeScript over JavaScript. ☺

New discoveries — Foregit is a plain Ruby project, no Rails magic there, so I had to explore a different area of gems.

  1. Git — at first I thought I will have to write OS commands to talk with my repository. Why? I don’t know why I was under the impression that the big Ruby community wouldn’t have a gem for that. RubyGit is the third most popular gem, and I’m still learning its ups and downs. Other gems have a lower activity rate, and even if I find some commands misleading, it did a good job until now.
  2. Commander — easy to define command lines? Yeah, this is the gem for you. Good docs and intuitive.
  3. HammerCli — it’s a framework from Foreman for writing CLI plugins. It’s in an early development stage, docs need improvements but it’s easy to extend and again intuitive.
  4. ApiPie — a set of gems:
  • apipie-rails: generate docs based on your RESTful API codebase / comments,
  • apipie-bindings: an agnostic API wrapper.

5. The last, but very important: PryDebug. If you know Python then you know about ipython and pdb. Pry it’s an alternative to irb and PryDebug is a debug/tracing tool based on it. The most important discovery of the month ☺.

I’m really interested in your opinions, so please share your favourite gems.

--

--