Created
March 18, 2011 15:40
-
-
Save enebo/876288 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
launcher = ARGV.shift || "jruby" | |
options = ARGV.shift || "" | |
$jruby = "#{launcher} #{options}" | |
def jruby_command(command, *args) | |
command = "#{$jruby} -S #{command} #{args.join(' ')}" | |
puts "$ #{command}" | |
value = system command | |
puts value | |
end | |
rails_app = 'frogger' | |
FileUtils.rm_rf rails_app | |
jruby_command("gem", "install rails") | |
jruby_command("rails", "new", rails_app, "-m http://jruby.org/rails3.rb") | |
Dir.chdir(rails_app) do | |
jruby_command("bundle", "install") | |
jruby_command("rails", "generate scaffold person name:string") | |
jruby_command("rake", "db:migrate") | |
jruby_command("rails", "server") | |
end | |
puts "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment