diff options
author | Tim Raymond <xtjraymondx@gmail.com> | 2013-01-03 15:08:50 -0500 |
---|---|---|
committer | Tim Raymond <xtjraymondx@gmail.com> | 2013-01-03 15:14:24 -0500 |
commit | 66258c0e48ed5cf26641a3096272a272611a783c (patch) | |
tree | 5cdb68cef80be86c0e922774a50737ec4c0efa7d /install.rb | |
parent | a89660947bd5faeef2a741f71f913c352da50cd3 (diff) | |
download | rails-66258c0e48ed5cf26641a3096272a272611a783c.tar.gz rails-66258c0e48ed5cf26641a3096272a272611a783c.tar.bz2 rails-66258c0e48ed5cf26641a3096272a272611a783c.zip |
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.
Diffstat (limited to 'install.rb')
-rw-r--r-- | install.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/install.rb b/install.rb index bf843e251e..3967624a3f 100644 --- a/install.rb +++ b/install.rb @@ -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` |