1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Tim Raymond 2013-01-03 15:08:50 -05:00
parent a89660947b
commit 66258c0e48

View file

@ -1,5 +1,10 @@
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`