Skip to content

A proof of concept demonstrating a Sinatra app under jRuby, Tomcat and Appengine

Notifications You must be signed in to change notification settings

dncrht/jruby-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

This is a proof of concept to demonstrate we can:

  • run a sinatra app with jRuby
  • run the app in a Java servlet container (Tomcat)
  • run the app in Google's Appengine

Contains a small ruby sinatra application under small_app.

Make sure you have a working JDK in your machine before starting!

Some prior experience with Java, Appengine and Ruby would be advisable.

Sinatra with jRuby

  • Install the ruby version
  • Install bundler
gem install bundler
cd small_app
bundle

Run under Tomcat

gem install warbler
cd small_app
warble

Now our ruby app is packaged in a format suitable for Java containers.

Run under Appengine

  • Download the SDK
  • Uncompress anywhere
  • Uncompress the war file inside appengine's directory, or symlink to the uncompressed war that tomcat created in webapps/small_app.war

Appengine applications need an appengine-web.xml. Create one next to web.xml in your WEB-INF war folder with the following contents:

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>YOUR_APP_NAME</application>
  <version>1</version>
  <threadsafe>true</threadsafe>
</appengine-web-app>
  • Start the appengine server bin/dev_appserver.sh small_app
  • Deploy to appengine production servers. You'll have to create an app first. bin/appcfg.sh update small_app

About

A proof of concept demonstrating a Sinatra app under jRuby, Tomcat and Appengine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages