Blog

JRuby on AppCloud Available Through Beta Program

By | May 24th, 2011 at 6:05PM

UPDATE: As of July 2011, JRuby on Engine Yard AppCloud is now available in public beta. For more information, review the Using JRuby on AppCloud Documentation.

We’re overjoyed to announce that customers can now sign up to use JRuby with Engine Yard AppCloud through our beta program. Engine Yard has been a strong supporter of the JRuby project and we’re thrilled that we can now begin offering JRuby support to our customers.

There are two camps of customers demanding JRuby:

  • Applications that desire to incorporate Java libraries
  • Developers wanting features that MRI cannot provide – real threads, a selection of modern garbage collectors, in-process caching, and full utilization of available memory, as starters.

A key enabler for JRuby support is Trinidad. Trinidad allows you to run rails or rack compatible applications within an embedded Apache Tomcat, and it is the creation of Engine Yard’s David Calavera.

Switching to Trinidad and JRuby in local development is very easy:

  1. Add to your Gemfile:
      platforms :jruby do
        gem 'activerecord-jdbc-adapter'
        gem 'jruby-openssl'
        gem 'jdbc-mysql', :require => false
        gem 'trinidad'
      end
      platforms :ruby do
        gem 'mysql2'
      end
  2. Install and switch to JRuby:
    $ rvm install jruby
    $ rvm jruby
    $ bundle
  3. Launch your Ruby application with Trinidad (it auto-detects what sort of Ruby web application you have):
    $ trinidad
  4. Open http://localhost:3000 in your browser and wait for the Tomcat application server to boot up, then you are good to go.
  5. Commit the Gemfile & Gemfile.lock changes (possibly to a branch)
  6. Deploy to staging environment on AppCloud setup with JRuby. There are some additional instructions and limitations in the Trinidad/JRuby documentation.

It is strongly suggested you trial your application against JRuby locally first, then in an AppCloud staging environment, and then upgrade your production environment.

As a feature under the beta program, we will endeavor to provide all JRuby users with feedback and support via the ey-beta-talk mailing list. It is our intent to stabilize our JRuby integration as soon as possible and move it into General Availability (and thus fully supported under Engine Yard Support programs).

Full House of Rubies

Personally, I’m more than overjoyed. With JRuby now available on AppCloud, Engine Yard is the first Ruby platform to make available all stable, production-ready Ruby implementations; most notably JRuby and Rubinius.

OSS Grant for David Calavera

I would also like to announce that earlier this year Engine Yard offered David Calavera an Engine Yard OSS Grant towards the Trinidad project. This has allowed David to travel to Baltimore last week to speak at RailsConf. We’re excited to continue to help David spread the word about Trinidad – it is our favorite “JRuby in a Box” solution!

  • http://torquebox.org/ Bob McWhirter

    Great news!  Anything that grows the JRuby playing field is awesome.

    Though, should’ve used TorqueBox.  Or the upcoming TorqueBox 2.x, with 100% less monster.  :)

  • Mark Menard

    This is an awesome day for JRuby. My heartfelt congratulation to ALL of the JRuby folks. You’re doing awesome work. I can’t wait for JDK7+JRuby7 with invokedynamic. 

  • http://twitter.com/calavera David Calavera

    @6567ffd7adb496c1769d9d2fc1ba0f52:disqus I’m really looking forward to see all those new goodies in torquebox 2.x
    @google-da89cfe420349c82c50abc8d473dd692:disqus me neither!

  • Mark Cotner

    +1 on torquebox, but any JRuby support is welcome, even with limited functionality

  • http://www.engineyard.com/blog/2011/leveraging-trinidad-and-jruby-on-appcloud/ Leveraging Trinidad and JRuby on AppCloud | Engine Yard Ruby on Rails Blog

    [...] you may recall, we introduced the JRuby beta program a few weeks ago. Today, we’d like to provide more details about Trinidad, the application [...]