Example of a Sinatra app for Google AppEngine (JRuby) from http://blog.bigcurl.de/2009/04/running-sinatra-apps-on-google.html
Switch branches/tags
Nothing to show
Latest commit eeb3605 Apr 22, 2009 @spraints spraints Moved split-jruby.sh into a Rakefile to make it (hopefully) more reli…
…able. Changed the rackup file so that the tweak to sinatra.rb is no longer required.


# install jruby
git clone git://github.com/jruby/jruby.git
cd jruby
ant jar-complete
cd ..
mv jruby /usr/local/
sudo ln -s /usr/local/jruby/bin/jruby /usr/local/bin/jruby
jruby -v
jruby -S gem install rake sinatra warbler haml

# get jruby-rack
git clone git://github.com/nicksieger/jruby-rack.git
cd jruby-rack
jruby -S rake SKIP_SPECS=true
cd ..

# get appengine-java-sdk
# http://code.google.com/appengine/downloads.html

# create sinatra app
git clone git://github.com/seven1m/sinatra-appengine-example.git myapp
cd !$
jruby -S rake jrubyjars JRUBY_COMPLETE=/usr/local/jruby/lib/jruby-complete.jar
cp -r ../jruby-rack/target/jruby-rack-*.jar lib
cp ../appengine-java-sdk-1.2.0/lib/user/appengine-api-1.0-sdk-1.2.0.jar lib/
jruby -S warble

# to test
../appengine-java-sdk-1.2.0/bin/dev_appserver.sh tmp/war

# to push to Google AppEngine
# copy your application id into appengine-web.xml file and replace YOUR-APPLICATION-ID
../appengine-java-sdk-1.2.0/bin/appcfg.sh update tmp/war
# now visit your app's home on the web!

# change version if you want to push a new "version"
# inside appengine-web.xml file