aboutsummaryrefslogtreecommitdiffstats
path: root/install.rb
diff options
context:
space:
mode:
authorTim Raymond <xtjraymondx@gmail.com>2013-01-03 15:08:50 -0500
committerTim Raymond <xtjraymondx@gmail.com>2013-01-03 15:14:24 -0500
commit66258c0e48ed5cf26641a3096272a272611a783c (patch)
tree5cdb68cef80be86c0e922774a50737ec4c0efa7d /install.rb
parenta89660947bd5faeef2a741f71f913c352da50cd3 (diff)
downloadrails-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.rb5
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`