0

I take a look about deploying Ruby on a server, and I found Warbler for Jruby. I have several questions where I didn't find a straight answer.

Does Warbler is used only to package Jruby app (like Jruby on Rails), or can it be used to package any ruby app (Rails, Sinatra, pure ruby, jruby …) ?

Can you deploy with it only on a java server like Glassfish, or can you deploy also on an app server like Thin ?

Simon
  • 619
  • 2
  • 9
  • 23

2 Answers2

1

You can use warble to package several JRuby/Ruby app, Rails, Sinatra, ecc...Warbler does an awesome job to try to autodetect the framework and package it the right way, or you can execute a

  warble config

that creates a config.rb file where you can specify some options.

You can even package your project as a runnable war with an embedded webserver, or only a jar that you can execute with

  java -jar myjar.jar

For web application, you can deploy your war wherever you want, almost any app server that support servlet api 2.5 I think...

Luke
  • 3,381
  • 1
  • 20
  • 20
  • Ok, so it will work with Rails and Jruby on Rails, great ! I have just another question that pop in my mind. Once I put the .war on the server, how can I run a bundle install and a rake db:migrate ? – Simon Aug 03 '12 at 09:02
  • The bundle install is unnecessary because Warbler brings all the dependencies and bundle it inside the war. For database migration it depends, I usually don't do migration on production, or if you really want you can do: rake db:migrate RAILS_ENV=production – Luke Aug 03 '12 at 09:31
  • Well, you have to setup the db at one point after the first deploy, right ? Or is it magically done by Warbler too ? – Simon Aug 03 '12 at 10:03
1

As explained in https://github.com/jruby/warbler:

Warbler provides a minimal, flexible, Ruby-like way to bundle up all of your application files for deployment to a Java environment.

Warbler's artifact is the WAR file. If the application server understands it, you'll be fine. Glassfish is OK, but I don't think Thin is.

banzaiman
  • 2,631
  • 18
  • 27