Gems can be such an amazing time saver and can vastly improving your apps functionality, security, maintainability, and presentability. It can be very easy for a new developer to load their app up with every gem under the sun.
Letting your Gemfile get out of hand can quickly bloat your project with a lot of unnecessary code and some times it is better to build the methods on your own so that you can gain a deeper knowledge set.
With all this being said I’ve created a list of Gems that I’ve either used and loved or plan to use on future projects.
Authentication
- Devise - This is a very robust authentication gem with excellent documentation. When I used this gem I found the helpers like
user_signed_in?and `current_user’ to make this much simpler but this is just the tip of the iceberg. - CanCanCan - All of your permissions are defined in the
Abilityclass which can then be accessed by usingcan?andcannot?. This gem helps to better organize permissions and make your code more readable.
User Interfaces
- Kaminari - When the number of items in your database starts to get a little unwieldy and you want the user or yourself to have more control over the pagination this is your solution. This full featured paginator has everything you need to make database display simple and effective.
- Chartkick - An awesomely simple tool to make JavaScript charts out of a single line of Ruby. All you have to do is pick what kind of chart you’d like and what data you’d like to be presented and viola, it’s just that easy.
- CarrierWave - Need to allow the user to upload certain files but want to limit the types of files they can upload? Want to allow the user to upload files from remote locations? CarrierWave is a wonderfully straightforward solution.
- Ransack - Regardless of whether you just need a simple search form or a more advanced form Ransack is going to be a great option. Documentation for this gem is very clearly written for how robust it can be.
Helping the Developer
- Annotate - This gem allows you to add a comment showing the current schema to your models, tests, fixtures, factories, and/or routes. Very simple but can make a world of difference in terms of maintainability.
- RuboCop - This is a great code analyzer which helps the programmer stay within the guidlines in the Ruby Style Guide. It’s always nice to have your work checked for you.
- Figaro - A gem focused on keeping sesitive configuration information, like tokens, out of Git. As a big added bonus it is also Heroku-friendly.
SEO
- MetaTags - This plugin allows you to streamline the SEO process so you can get back to cranking out incredible content.