1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/bin/rails
2006-03-19 16:55:16 +00:00

28 lines
861 B
Text
Executable file

min_release = "1.8.2 (2004-12-25)"
ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
if ruby_release =~ /1\.8\.3/
abort <<-end_message
Rails does not work with Ruby version 1.8.3.
Please upgrade to version 1.8.4 or downgrade to 1.8.2.
end_message
elsif 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
Signal.trap("INT") { puts; exit }
require File.dirname(__FILE__) + '/../lib/rails_version'
abort "Rails #{Rails::VERSION::STRING}" if %w(--version -v).include? ARGV.first
require File.dirname(__FILE__) + '/../lib/rails_generator'
require 'rails_generator/scripts/generate'
Rails::Generator::Base.use_application_sources!
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')