aboutsummaryrefslogtreecommitdiffstats
path: root/railties/bin/rails
blob: fdbb4d93f36312c15ee50c4df55d74909621839b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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

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')