2005-07-09 01:04:19 -04:00
|
|
|
min_release = "1.8.2 (2004-12-25)"
|
|
|
|
ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
|
|
|
|
if ruby_release < min_release
|
|
|
|
abort <<-end_message
|
|
|
|
|
|
|
|
Rails requires Ruby version #{min_release} or later.
|
|
|
|
You're running #{ruby_release}; please upgrade to continue.
|
|
|
|
|
|
|
|
end_message
|
|
|
|
end
|
2005-02-27 15:40:10 -05:00
|
|
|
|
2005-05-21 07:05:18 -04:00
|
|
|
Signal.trap("INT") { puts; exit }
|
|
|
|
|
2005-10-09 17:15:45 -04:00
|
|
|
require File.dirname(__FILE__) + '/../lib/version'
|
|
|
|
abort "Rails #{Rails::Version::STRING}" if %w(--version -v).include? ARGV.first
|
|
|
|
|
2005-02-07 08:14:05 -05:00
|
|
|
require File.dirname(__FILE__) + '/../lib/rails_generator'
|
2005-10-09 17:15:45 -04:00
|
|
|
|
2005-02-07 08:14:05 -05:00
|
|
|
require 'rails_generator/scripts/generate'
|
|
|
|
Rails::Generator::Base.use_application_sources!
|
2005-05-21 07:05:18 -04:00
|
|
|
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
|