Trinidad /Rails 3 standalone app

I have a Rails 3 application that I want to be able to distribute to
other boxes without the requirement that jruby or tomcat be installed
already on those servers. My thought was to use a combination of
Trinidad and Jruby complete, but I haven’t quite figured out where to
put the files.

Has anybody done this before? My hope is that the only requirement is
having java installed on the fresh box, everythign else is selfc
contained.

Thanks,
Chris

On Wed, Jan 26, 2011 at 9:42 AM, Chris E. [email protected]
wrote:

I have a Rails 3 application that I want to be able to distribute to
other boxes without the requirement that jruby or tomcat be installed
already on those servers. My thought was to use a combination of
Trinidad and Jruby complete, but I haven’t quite figured out where to
put the files.

Has anybody done this before? My hope is that the only requirement is
having java installed on the fresh box, everythign else is selfc
contained.

Consider trying Warbler with the “executable jar” option:

http://caldersphere.rubyforge.org/warbler/

/Nick

What webserver does that use?

Thanks,
Chris

Hi Cris,

as you said Java is your only dependency. Trinidad packs Tomcat jars
into a
gem so if you install those gems in your jruby distribution is ready to
go.

If you find any issue just let me know.

Cheers

The problem I encounter with Trinidad is that I don’t want the
requirement to have Jruby installed, other than in my packaged app.
I’m working on installing Jruby in rails’ vendor directory and
creating a startup.sh that adds Jruby & gems to the path before
launching Trinidad. I wasn’t sure whether I was heading down the
right path or not, though.


Thanks,
Chris

On Wed, Jan 26, 2011 at 1:48 PM, David C.

Right now it uses Winstone which is a small servlet container that
e.g., Hudson/Jenkins use for its executable war mode. I think it could
be made to use Jetty in the future as well, and maybe others.

/Nick

Nick.

That seems interesting, I’ll check it out. It might end up being
too packaged for my app at this stage, where I might need to modify
database.yml or other configs within the app. It definitely makes it
nice, though, to say “download this jar, run java -jar whatever.jr,
and you’re done”. I like the way Hudson is packaged like that.


Thanks,
Chris

Jetty is good for this. Look at Embedding Jetty in their How Tos /
Tutorials-
http://wiki.eclipse.org/Jetty

We embed Jetty for our app server daemons, but they are plain rack
instead or rack + rails. We ended up making some small changes to the
rack adapter so that we didn’t need a rack up script, not sure if this
is strictly necessary, but it helped us to get our app working with ruby
and jruby without massively different code paths for each.

Works great for us, although we don’t distribute jruby with our
application and we rely on jruby-jsvc (trinidad has a module for this,
too) for starting and stopping the daemon.

On Wed, 2011-01-26 at 15:06 -0800, jeffContext wrote:

I have a Rails 3 application that I
only requirement is
http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Nick G.
Developer @ Media Service Provider
+44 207 729 4797

Nick, that remembers me that I owe you a pull request for jruby-jsvc