Forum: JRuby Do I need to install ruby & gems on production server ?

Posted by Pinit Asavanuchit (cyberjom)
on 2010-03-08 19:58
Sorry for basic question but I can't find clear answer ?

I'm currently develop app on rails. But I have a case to deploy this app
on Java machine running JBoss.
The machine has no ruby. If I use JRuby , Can I deploy JRuby app on the
machine without ruby & gems ?

For java app. I just put war file to that machine.

Thanks you very much.
Posted by Nick Sieger (Guest)
on 2010-03-08 22:39
(Received via mailing list)
Hi,

On Mon, Mar 8, 2010 at 12:58 PM, Pinit Asavanuchit 
<lists@ruby-forum.com> wrote:
> Sorry for basic question but I can't find clear answer ?
>
> I'm currently develop app on rails. But I have a case to deploy this app
> on Java machine running JBoss.
> The machine has no ruby. If I use JRuby , Can I deploy JRuby app on the
> machine without ruby & gems ?
>
> For java app. I just put war file to that machine.

You shouldn't need it. Using Warbler for example the point is to
create a deployable that doesn't need Ruby or JRuby installed on the
machine where it's deployed.

Hope that answers it for you,

/Nick

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Posted by Richard Conroy (Guest)
on 2010-03-08 23:13
(Received via mailing list)
On Mon, Mar 8, 2010 at 9:38 PM, Nick Sieger <nicksieger@gmail.com> 
wrote:

> >
> > For java app. I just put war file to that machine.
>
> You shouldn't need it. Using Warbler for example the point is to
> create a deployable that doesn't need Ruby or JRuby installed on the
> machine where it's deployed.
>
> Hope that answers it for you,
>
>
Doesn't that mean that the WAR file created by Warbler will contain the
jruby.jar file
and all of the ruby specific gems? Just clarifying here.
Posted by Michael Johann (malagant)
on 2010-03-08 23:17
(Received via mailing list)
Richard,

you're right.
It's a good idea to freeze rails and the gems including dependencies 
with:

jruby -S rake gems:unpack:dependencies
jruby -S rake rails:freeze:gems

After this (and warble run), you should have everything in your WAR.

No need for other gems etc.

Cheers
Michael Johann

Am 08.03.2010 um 23:10 schrieb Richard Conroy:
Posted by Vladimir Sizikov (Guest)
on 2010-03-09 08:46
(Received via mailing list)
> Doesn't that mean that the WAR file created by Warbler will contain the
> jruby.jar file
> and all of the ruby specific gems? Just clarifying here.

Indeed. On your dev machine you'd need jruby and all the required
gems. But once the whole thing is packaged into a WAR file, that WAR
file does not need anything extra, it contains everything needed. And
as Michael mentioned, it is a good idea to freeze gems.

Thanks,
  --Vladimir

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Posted by Pinit Asavanuchit (cyberjom)
on 2010-03-09 10:21
Thanks you very much. I feel that Jruby will be good alternative for me 
for Java Environment.

Another question is that. For activerecord adapter. for example 
activerecord-oracle-adapter

When deploy in WAR file. Will it use activerecord-oracle-adapter or it 
use JDBC driver ?


Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.