Created
December 5, 2009 20:15
-
-
Save woodie/249844 to your computer and use it in GitHub Desktop.
Rails 3 on App Engine - from hg files
This file contains 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
#!/usr/bin/ruby | |
require 'rubygems' | |
file_base = 'http://appengine-jruby.googlecode.com/hg/demos/rails/' | |
mod_files = %w{ app/controllers/rails/info_controller.rb | |
Gemfile config/application_rb config/boot.rb | |
config/initializers/notifications.rb config_ru } | |
# Install apengine gems if missing | |
gems_index = Gem::SourceIndex.from_gems_in('local') | |
unless gems_index.find_name('google-appengine', '>=0.0.6') | |
run 'gem install google-appengine', :sudo => true | |
end | |
system "curl -O #{file_base}Gemfile" | |
system 'appcfg.rb bundle . --update' | |
system 'appcfg.rb run bin/rails .' # answer yes to all | |
mod_files.each do |path| | |
system "curl -o #{path} #{file_base}#{path}" | |
end | |
# TODO: prepend confir_ru to config.ru | |
# TODO: insert config/application_rb into config/application.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment