Creating a rails3 application with jruby

Create the application:

$> rails new [APP_NAME] -d [DB_ADAPTER] -m

Add warbler to your app. Edit Rails.root/Gemfile:

group :development do
  platforms :jruby do
    gem 'warbler'

Install your bundle:

$> bundle install

Check the installation:

$> rails server

Open http://localhost:3000.

Deploying to Tomcat

Using sqlite3

If you are using sqlite for production, you may want to include the Rails.root/db to the war file. To do this, you'll have to create a warble config file:

$> warble config

Then, edit Rails.root/config/warble.rb: do |config|
  config.dirs = %w(app config db lib log vendor tmp)

Packiging and move to production

Convert the application to a .war file:

$> warble

Install Tomcat. Copy the .war file to the tomcat/webapps folder. Open a browser at http://localhost:8080/manager (admin:admin) and enable your application.

Open http://localhost:8080/[APP_NAME]


  • The production log is written to [TOMCAT]/log/localhost.YYYY-MM-DD.log