A Rails Engine for Local Development
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib v0.1.3 Feb 26, 2013
.gitignore initial release Nov 12, 2012
CODE_OF_CONDUCT.md add a Code of Conduct via the Contributor Covenant Jan 7, 2016
Gemfile initial release Nov 12, 2012
LICENSE.txt initial release Nov 12, 2012
README.md add a Code of Conduct via the Contributor Covenant Jan 7, 2016
Rakefile initial release Nov 12, 2012


Localmotive: a Rails Engine for local development

Very often, we want to override the settings for our application which are contained in source control with our own local values. This could be to use our own AWS key, SMTP server, or database url. It is also useful to run a tweaked version of your production or staging environment that is mostly faithful to the original but has some extras to make it friendlier for local development (like not using a CDN)

For these reasons and more, localmotive lets you maintain your own custom per-environment configurations that lie outside your main source control without giving up orderliness.


Add this to your rails application's development group:

group :development do
  gem 'localmotive'

If you want to use localmotive in environments other than just development, you can either enumerate them

gem 'localmotive', :groups => [:development, :test]

Or just add it to the default group

gem 'localmotive'


To get started, run the install command

rails generate localmotive

This will generate your local config files

create  .local/config/application.rb
create  .local/config/environments/development.rb
create  .local/config/environments/production.rb
create  .local/config/environments/test.rb
append  .gitignore

This will create a mirror of your rails environment configuration files in the .local directory and add it to your .gitignore. That way, each developer can locally configure their application to their heart's content without worrying about

  1. clobbering anybody else's configuration
  2. accidentally checking in sensitive configuration information to source control

The load rules of your local environment shadow those of vanilla rails. So, if you are running in the development environment, localmotive will load

  1. .local/config/application.rb
  2. .local/config/environments/development.rb

local configuration files are loaded only after all stock configuration has been run, but before application initialization. That way, you can be sure that your settings will take precedence.


Localmotive was developed at The FrontSide in order to avoid development papercuts

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms, which can be found in the CODE_OF_CONDUCT.md file in this repository.