- Technologies
- Preferred Gems
- Authentication
- Authorization
- Active Record
- Abstraction
- Pagination
- API
- Decorators
- File Uploading
- HTTP Clients
- Searching
- Scheduled/Recurrence Jobs
- Environment Variables
- Admin Panel
- Logging
- Debug
- Data Visualization
- Database Tools
- Code Analysis and Metrics
- Testing
- Security
- Production
- Error Handling
- Mobile Development
- Other
- Coding Conventions
- .gitignore
- Best Practices
- Load Balancing
- Load Testing
- Useful Links
- Recommended Books
- Ruby 2.7.x (latest stable)
- Ruby on Rails 5.x (latest stable)
- Ruby environment management: rvm
We don’t use Windows as OS for development machines. We use latest macOS or Ubuntu/Debian (long-term support releases are preferred).
- RubyMine (not required)
- Use latest stable nginx
- Prefer latest stable PostgreSQL
- Prefer Amazon Web Services
- pundit - Minimal authorization through OO design and pure Ruby classes.
- rolify - Role management library with resource scoping.
- AASM - State machines for Ruby classes.
- active_record_union - UNIONs in ActiveRecord! Adds proper union and union_all methods to ActiveRecord::Relation.
- PaperTrail - PaperTrail lets you track changes to your models' data. It's good for auditing or versioning.
- globalize - Rails I18n de-facto standard library for ActiveRecord model/data translation.
- interactor - Interactor provides a common interface for performing complex user interactions.
- wisper - A micro library providing objects with Publish-Subscribe capabilities.
- Pagy - Pagy is the ultimate pagination gem that outperforms the others in each and every benchmark and comparison.
- Kaminari - A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for modern web app frameworks and ORMs.
- rspec-rails-swagger - This gem helps you generate Swagger docs by using RSpec to document the paths.
- swagger-blocks - For generating API documentation in Swagger format.
- letter_opener - Preview mail in the browser instead of sending.
- email_address - Provides a ruby language library for working with email addresses.
- Dalli - A high performance pure Ruby client for accessing memcached servers.
- Draper - Draper adds an object-oriented layer of presentation logic to your Rails application.
- shrine - File Attachment toolkit for Ruby applications.
- image_processing - High-level image processing helper methods with libvips and ImageMagick/GraphicsMagick.
- shrine-url - Custom URL storage for Shrine.
- Faraday - HTTP client lib that provides a common interface over many adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle.
- elasticsearch-rails
- searchkick - Intelligent search made easy with Rails and Elasticsearch.
- pg_search - pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL's full text search.
- Whenever - whenever is a Ruby gem that provides a clear syntax for writing and deploying cron jobs.
- Sidekiq - Simple, efficient background processing for Ruby.
- sidekiq-scheduler - Lightweight job scheduler extension for Sidekiq.
- sidekiq-unique-jobs - Ensure uniqueness of your Sidekiq jobs.
- sidekiq-batch - Simple Sidekiq Batch Job implementation.
- dotenv - For setting shell environment variables.
- ActiveAdmin - ActiveAdmin is a administration framework for Ruby on Rails applications.
- active_skin - Flat skin for active admin.
- activeadmin_addons - Extends ActiveAdmin to enable a set of great optional UX improving add-ons.
- Ahoy - Ahoy provides a solid foundation to track visits and events in Ruby, JavaScript, and native apps.
- Lograge - An attempt to tame Rails' default policy to log everything.
- pry-rails - Avoid repeating yourself, use pry-rails instead of copying the initializer to every rails project. This is a small gem which causes rails console to open pry. It therefore depends on pry.
- awesome_print - Awesome Print is a Ruby library that pretty prints Ruby objects in full color exposing their internal structure with proper indentation.
- RailsRoady - UML diagram generation on models and controllers.
- lol_dba - Small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed.
- RuboCop - Rubocop is a Ruby static code analyzer.
- rubocop-performance - An extension of RuboCop focused on code performance checks.
- Reek - Code smell detector for Ruby.
- rails_best_practices - Code metric tool for Rails projects.
- Fasterer - Make your Rubies go faster with this command line tool highly inspired by fast-ruby and Sferik's talk at Baruco Conf.
- Rubycritic - A Ruby code quality reporter.
- rspec - Use latest versions.
- rspec_rails
- shoulda-matchers
- shoulda-callback-matchers
- rspec-its
- rspec-activemodel-mocks
- simplecov
- database_cleaner
- database_rewinder
- factory_bot_rails
- ffaker
- VCR - Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
- shrine-memory - Provides in-memory storage for Shrine.
- brakeman - Brakeman is a static analysis tool which checks Ruby on Rails applications for security vulnerabilities.
- bundler-audit - bundler-audit is a patch-level verification tool for Bundler which checks for vulnerable versions of gems and insecure gem sources.
- Puma as a Ruby web server
- Capistrano - Remote multi-server automation tool.
- rack-timeout - Add timeouts to rack applications.
- Rack Attack - Rack middleware to blocking & throttling.
- newrelic_rpm - New Relic RPM Ruby Agent.
- exception_notification - For error/exception notifications from server.
- Raven Ruby - Raven is a Ruby client for Sentry.
- rpush
- venice - Venice is a simple gem for verifying Apple In-App Purchase receipts, and retrieving the information associated with receipt data.
- money-rails - Integration of RubyMoney - Money with Rails.
- eu_central_bank - This gem downloads the exchange rates from the European Central Bank. You can calculate exchange rates with it. It is compatible with the money gem.
- rails-settings-cached - Manage settings with Ruby on Rails.
- squasher
- health_check
- RSpec Best Practices
- The Ultimate Guide to Ruby Timeouts
- Best practices for running Rails in production
Add the following lines to default Rails-generated .gitignore
file:
.DS_Store
database.yml
secrets.yml
.idea
coverage/
.env.development.local
.env.test.local
.env.production.local
- Use ActiveRecord ORM (scopes, enums, where with conditions, order etc) instead of raw SQL queries
- You may want to keep your schema up-to-date with Rails ERD
- Avoid common security problems following Ruby on Rails Security Guide
- Never store production data (logins, passwords etc) in source code repository
- Keep
config/database.yml
andconfig/secrets.yml
outside of the source code repository. Use shell environment variables instead. More info here
- We use Apache JMeter in strong collaboration with our QA Department.
- Ruby Weekly - subscribe to it!
- Green Ruby News
- This week in Rails
- Awesome Rails
- Awesome Ruby
- Ruby Toolbox
- The 12-factor app - a methodology for building SaaS apps