From 66258c0e48ed5cf26641a3096272a272611a783c Mon Sep 17 00:00:00 2001 From: Tim Raymond Date: Thu, 3 Jan 2013 15:08:50 -0500 Subject: 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. --- install.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'install.rb') 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` -- cgit v1.2.3