My favourite mixin
Top Ruby gems I use
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.
- Rails — the best web framework for Ruby. Rails was the reason I learnt Ruby, it’s like a genie in a bottle for web.
- 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.
- Rspec — TDD it’s one of the most recommended development methodologies. Testing is transformed to storytelling with Rspec.
- 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.
- 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.
- Rake — make tasks for Ruby. You are a Rakefile away from transforming common and repetitive commands into easy to use tasks.
- OmniAuth and OmniAuth2— the most popular authorization protocol is represented by these small gems, which are integrated in gems like Devise.
- Koala — integration with Facebook API. Login via Facebook is a minimum requirement for a social app. For Twitter you can try twitter.
- 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.
- 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.
- 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.
- Commander — easy to define command lines? Yeah, this is the gem for you. Good docs and intuitive.
- 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.
- 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.