rails/install.rb
Tim Raymond 66258c0e48 Adding a usage message to install.rb script
Previously, invoking the install.rb script with zero arguments
caused it to attempt to install all gems without a version
suffix, which would fail spectacularly. Failing gracefully with
a usage message is more helpful to a first-time user.
2013-01-03 15:14:24 -05:00

17 lines
529 B
Ruby

version = ARGV.pop
if version.nil?
puts "Usage: ruby install.rb version"
exit(64)
end
%w( activesupport activemodel activerecord actionpack actionmailer railties ).each do |framework|
puts "Installing #{framework}..."
`cd #{framework} && gem build #{framework}.gemspec && gem install #{framework}-#{version}.gem --local --no-ri --no-rdoc && rm #{framework}-#{version}.gem`
end
puts "Installing Rails..."
`gem build rails.gemspec`
`gem install rails-#{version}.gem --local --no-ri --no-rdoc `
`rm rails-#{version}.gem`