ruk·si

💎 Ruby
Gems

Updated at 2015-08-31 06:04

This note contains interesting Ruby gems that all Ruby developmers should know about.

Repositories:

General:

  • sitemap_generator: Automatically generate sitemap for the app.
  • geoip: Get geographic location based on IP.
  • ice_cube: Helps defining repeating events like weekly schedules.
  • sidekiq: Background processing for Ruby.
  • simple_form: Form helpers with Bootstrap integraiton.
  • country_select: Create a dropdown where you can select a country. Pair up with countries for localization.

Monitoring and Debugging:

  • better_errors: Replaces default Rails error page with more useful details.
  • binding_of_caller: Make better_errors even more aweome with REPL and other goodies.
  • quet_assets: Reduces the amount of noise in your logs.
  • Sentry: Error logging for production, the client is called raven.
  • New Relic: Application performance monitor, good for cases where there are no errors but app is just really slow.
  • legato: Google Analytics reporting API.
  • staccato: Google Analytics measurement protocol implementation.

Auth:

  • devise: Modular authentication for Rails apps, check what all the modules do.
  • rails_admin: Creating admin dashboards, works with Devise. Try this first and use activeadmin if rails_admin is not enough.
  • omniauth: Social network logins, works with Devise if wanted.
  • cancancan: Authorization library, works with Devise.
  • rack-ssl-enforcer: Enforce SSL connections.

Payments:

  • Braintree: Accepting payments from anywhere, costs the same as Stripe but has $50k free tier Only thing limited is where the receiver is registered, but works for USA and Finland businesses. Offers recurring billing.
  • Stripe: Accepting payments from anywhere, costs the same as Braintree, easier to integrate and more prettier embedded interface. Only thing limited is where the receiver is registered, but works for USA and Finland businesses. Offers recurring billing.
  • active_merchant: Unified interface for almost all the imaginable payment processors. Might be worth a look.

Models and Database:

  • ar-uuid: Use UUIDs in place of integers for model primary keys.
  • active_attr: ActiveModel extension, making non-database models more like ActiveRecords.
  • paranoia: Add undo action to model deletion.
  • kaminari: Add pagination to models e.g. User.page(7).
  • audited-activerecord: Adds change logging to your models.
  • paperclip: Manage model file uploads e.g. resizing and cropping.
  • geocoder: Add and use geo data in your models e.g. Hotel.near(”Vancouver, Canada”).
  • activerecord-postgis-adapter: Allows PostGIS geospatial functionality to PostgreSQL.

Testing:

  • rspec-rails: The most popular testing framework.
  • factory_girl_rails: Allows creating test objects, works with rspec.
  • database_cleaner: Allows cleaning your test database, works with factory_girl and rspec.
  • capybara: Testing UI with real clicks. Default Capybara uses Rack::Test which doesn't support JavaScript, use Selenium or external Webkit driver for JavaScript testing.

Parsers:

  • nokogiri: HTML, XML, SAX, and Reader parser, allows searching with CSS selectors.