Created
November 16, 2015 02:43
-
-
Save Teino1978-Corp/58cc3d699dc39987379f to your computer and use it in GitHub Desktop.
Lean Rails Application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Doing it this way means you are loading the app directly from a custom boot script. I also specified a custom environment and Gemfile: | |
RAILS_ENV=lean_development BUNDLE_GEMFILE=LeanGemfile bundle exec script/lean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/lean_application.rb | |
# | |
# Require and run only a part of your Rails app (maybe as a background process) | |
# | |
require File.expand_path('../boot', __FILE__) | |
require 'active_record/railtie' | |
require 'action_mailer/railtie' | |
Bundler.require *Rails.groups(:assets => %w(development test)) | |
module Lean | |
class Application < Rails::Application | |
config.time_zone = 'Pacific Time (US & Canada)' | |
config.encoding = 'utf-8' | |
config.autoload_paths << config.root.join('lib') | |
config.assets.enabled = false | |
config.paths['config/routes'] = [] # skip routes | |
config.paths['config/initializers'] = Dir[config.root.join('config/lean_initializers/*')] # custom initializers | |
end | |
end | |
Lean::Application.initialize! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment