Do you recommend deploying Rails applications as WARs?

Hey,
Does deploying Rails application via JRuby on Java web container has
any disadvantages?
IMHO, I think deploying Rails applications as WAR is best approach and
the most comforting one.
What do you think?
Thanks.

We're deploying on JBoss with warbler (JBoss 4.x on Java 5, so we can't use
TorqueBox). I think it's a great solution when you're dealing with a
separate deployment team with Java experience but no Ruby experience. Just
hand them a WAR file and... done!

One of the big issues we've run into is accessing the outside filesystem.
Right now we're using JBoss-specific APIs to do that, and can only access
files within the JBoss CLASSPATH. This is fine for reading files from the
external filesystem, but AFAICT if you need to write to the outside
filesystem you're SOL. Maybe there's someone else who knows more about
that.

···

On Sun, Feb 28, 2010 at 8:15 AM, Hussein B <hubaghdadi@gmail.com> wrote:

Hey,
Does deploying Rails application via JRuby on Java web container has
any disadvantages?
IMHO, I think deploying Rails applications as WAR is best approach and
the most comforting one.

--
Tony Arcieri
Medioh! A Kudelski Brand

Does deploying Rails application via JRuby on Java web container has
any disadvantages?

Yes. For one thing, you can't use gems/plugins with native code; that
may or may not be an issue for you. And the whole thing just "feels"
heavier to me. YMMV.

IMHO, I think deploying Rails applications as WAR is best approach and
the most comforting one.

There are some cases where it's necessary, so it's good that it's
an option (and admittedly getting easier).

We're deploying on JBoss with warbler (JBoss 4.x on Java 5

One of the big issues we've run into is accessing the outside filesystem.
Right now we're using JBoss-specific APIs to do that, and can only access
files within the JBoss CLASSPATH. This is fine for reading files from the
external filesystem, but AFAICT if you need to write to the outside
filesystem you're SOL.

Are you sure that's not a Java security manager issue?

We've run our app on OC4J, Tomcat, and Glassfish (v3), and haven't
ever had any issue with writing files (saving avatar images, etc.).

···

On Sun, Feb 28, 2010 at 9:10 AM, Tony Arcieri <tony@medioh.com> wrote:

On Sun, Feb 28, 2010 at 8:15 AM, Hussein B <hubaghdadi@gmail.com> wrote:

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan

A small correction: you can use native code so long as the gem in question
is written with FFI (e.g. Nokogiri)

That said, you'll probably want to avoid this if possible as well, as it
takes you away from the seamlessness of a pure Java deployment.

···

On Sun, Feb 28, 2010 at 10:48 AM, Hassan Schroeder < hassan.schroeder@gmail.com> wrote:

Yes. For one thing, you can't use gems/plugins with native code; that
may or may not be an issue for you.

--
Tony Arcieri
Medioh! A Kudelski Brand