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:
parent
a89660947b
commit
66258c0e48
1 changed files with 5 additions and 0 deletions
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue