Possible to run Ruby on Apache Tomcat server?

This might be a bit of an unusual set up but I’d like to have Java
classes and Ruby scripts (not JRuby) interacting together on a web
server to provide functionality for a web application. I do know JRuby
would be the solution for this but I specifically need Java and Ruby for
some tests I’m carrying out.

Is it possible to have them both running on a webserver and what would
be the ideal configuration? I’ve read about configuring apache with
fast-cgi but posts are quite old and i’m not sure it is the most
relevant answer anymore.

I have an apache tomcat server already installed and running so it would
be ideal if i could configure that to run ruby scripts too.

Possible?

Thanks!

This might be a bit of an unusual set up but I’d like to have Java
classes and Ruby scripts (not JRuby) interacting together on a web
server to provide functionality for a web application. I do know JRuby
would be the solution for this but I specifically need Java and Ruby for
some tests I’m carrying out.

Going to need more information than what you’ve given us. What kind of
tests are these that require MRI to be used? If you really do need a
non-JRuby solution you’re going to have to be a lot more specific about
what’s stopping you, as most people using Ruby in a Java environment are
going to be using JRuby in some capacity. Your situation sounds a bit
unique, so I’d just like to get as much information as possible to help
get you a reasonable answer.

Regards,
Chris W. (Twitter: @cwgem)

JRuby on Rails works great. Check out Warbler:
https://github.com/jruby/jruby/wiki/Warbler

Thanks for your reply.

I’m currently working on a runtime monitoring project and would like to
have a set up where two different technologies are working together in a
webapp so that i can monitor each of them. I wanted to avoid JRuby for
now since it’s a JVM language like Java while i wanted something more
diverse.

My lack of success in finding info about running ruby on a web server
did sort of indicate that I’m looking for an uncommon setup, so if this
is something that’s completely never done in practice do let me know!

Ruth

Chris W. wrote in post #1032328:

This might be a bit of an unusual set up but I’d like to have Java
classes and Ruby scripts (not JRuby) interacting together on a web
server to provide functionality for a web application. I do know JRuby
would be the solution for this but I specifically need Java and Ruby for
some tests I’m carrying out.

Going to need more information than what you’ve given us. What kind of
tests are these that require MRI to be used? If you really do need a
non-JRuby solution you’re going to have to be a lot more specific about
what’s stopping you, as most people using Ruby in a Java environment are
going to be using JRuby in some capacity. Your situation sounds a bit
unique, so I’d just like to get as much information as possible to help
get you a reasonable answer.

Regards,
Chris W. (Twitter: @cwgem)

It’s really not that unusual, especially in enterprise deployments.

Tomcat is a JSP container. If you want to run Ruby under Tomcat, you
use JRuby. If you wanted to run MRI or Rubinius, you’d just use a
different web server.

Why the JRuby hate? You seem to imply that Ruby and JRuby are distinct,

I do know JRuby
would be the solution for this but I specifically need Java and Ruby for
some tests I’m carrying out.

But JRuby is Ruby. Maybe if you give a little bit more information
about why you’re trying to do this?

On Thu, Nov 17, 2011 at 9:45 AM, Rm Mz [email protected] wrote:

This might be a bit of an unusual set up but I’d like to have Java
classes and Ruby scripts (not JRuby) interacting together on a web
server to provide functionality for a web application. I do know JRuby
would be the solution for this but I specifically need Java and Ruby for
some tests I’m carrying out.

This is a very confusing statement. JRuby is Java and Ruby together.
You write in Ruby, run in any JVM, call any Java libraries…I’m
confused why JRuby isn’t the right option for you.

Why not just use JRuby + Sinatra to bundle up the scripts you want to
expose through Tomcat and deploy that way?

  • Charlie

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs