2009-09-24 17:01:31 -04:00
|
|
|
begin
|
|
|
|
require 'rails/ruby_version_check'
|
|
|
|
rescue LoadError
|
|
|
|
# If people are not using gems, the load path must still
|
|
|
|
# be correct.
|
|
|
|
# TODO: Remove the begin / rescue block somehow
|
|
|
|
$:.unshift File.dirname(__FILE__) + '/../lib'
|
|
|
|
$:.unshift File.dirname(__FILE__) + '/../../activesupport/lib'
|
|
|
|
retry
|
|
|
|
end
|
|
|
|
|
2005-05-21 07:05:18 -04:00
|
|
|
Signal.trap("INT") { puts; exit }
|
|
|
|
|
2009-09-24 17:01:31 -04:00
|
|
|
require 'rails/version'
|
2006-04-03 18:39:36 -04:00
|
|
|
if %w(--version -v).include? ARGV.first
|
|
|
|
puts "Rails #{Rails::VERSION::STRING}"
|
|
|
|
exit(0)
|
|
|
|
end
|
2005-10-09 17:15:45 -04:00
|
|
|
|
2009-06-17 12:26:08 -04:00
|
|
|
ARGV << "--help" if ARGV.empty?
|
|
|
|
|
2009-10-16 15:49:39 -04:00
|
|
|
require 'rails'
|
2009-09-24 17:01:31 -04:00
|
|
|
require 'rails/generators'
|
|
|
|
require 'rails/generators/rails/app/app_generator'
|
2009-06-23 10:19:23 -04:00
|
|
|
|
2009-06-23 08:42:59 -04:00
|
|
|
Rails::Generators::AppGenerator.start
|