Do you recommend deploying Rails applications as WARs?

H

Hussein B

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.
 
T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

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.

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.
 
H

Hassan Schroeder

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.

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. =A0This 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.).

--=20
Hassan Schroeder ------------------------ (e-mail address removed)
twitter: @hassan
 
T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

On Sun, Feb 28, 2010 at 10:48 AM, Hassan Schroeder <
Yes. For one thing, you can't use gems/plugins with native code; that
may or may not be an issue for you.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top