Gemfile hierarchy in Ruby on Rails component based architecture When working on component based Rails applications you create a dependency hierarchy of local engines. Let’s say you have an admin_ui engine and a public_ui engine and they both depend on a domain_logic engine. TL;DR add bundler’s undocumented path 'components' at...

GIT precommit hooks helping local Ruby GEMs development I was working on a Ruby app that depended on a few private gems, the development was not just changing the app but also those gems. During development the Gemfile would look like: gem 'cargo_estimates', path: 'local_engines/cargo_estimates' gem 'shipping_calculator', path: 'local_engines/shipping_calculator' Running...

Feature flagging portions of your Ruby on Rails application with engines In the past I used Rails engines to create smaller components in complex Rails applications with the objective of a better long term maintainability. What that usually means is I separate out user interface engines from domain logic engines....

Using plugins as components of a large Ruby on Rails 2 application This is a short story about the creation and maintenance of a large Ruby on Rails application, and how after initially sticking to the Rails conventions I questioned them and used Rails plugins to structure the code of...

Use of Ruby on Rails environments When you generate a Ruby on Rails application it will create three environments: * development * production * test each has a corresponding configuration file: config/environments/development.rb config/environments/production.rb config/environments/test.rb The main purpose of those environments is to configure the Ruby on Rails framework. Rails guide...