1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/cli.rb
Chad Fowler dcc758acb0 detect being inside a rails application even from a subdirectory
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-06-10 14:16:45 -04:00

12 lines
356 B
Ruby

require 'rbconfig'
require 'rails/script_rails_loader'
Rails::ScriptRailsLoader.exec_script_rails!
railties_path = File.expand_path('../../lib', __FILE__)
$:.unshift(railties_path) if File.directory?(railties_path) && !$:.include?(railties_path)
require 'rails/ruby_version_check'
Signal.trap("INT") { puts; exit }
require 'rails/commands/application'