66258c0e48
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.
17 lines
529 B
Ruby
17 lines
529 B
Ruby
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`
|
|
end
|
|
|
|
puts "Installing Rails..."
|
|
`gem build rails.gemspec`
|
|
`gem install rails-#{version}.gem --local --no-ri --no-rdoc `
|
|
`rm rails-#{version}.gem`
|