Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6716933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:47:32+00:00 2026-05-26T08:47:32+00:00

I have a Ruby/Rails devvelopment environment using rbenv, MRI Ruby (1.9.2-p290), rails 3.0.9, and

  • 0

I have a Ruby/Rails devvelopment environment using rbenv, MRI Ruby (1.9.2-p290), rails 3.0.9, and SQLite3. I would like to port it to JRuby, but do it such that I don’t have to do anything more than run “rbenv local jruby-1.6.4” and “rails server” in the root directory of the Rails application to use it with JRuby, and “rbenv local 1.9.2-p290” and “rails serer” to use it with MRI Ruby.

I am aware that the gems to access SQLite are different for Ruby versus JRuby, but how do you write the Gemfile such that the MRI-relevant gems are picked up when the Ruby is MRI, and the JRuby-relevant gems are picked up when the Ruby is JRuby?

I will also need to port it to MySQL instead of SQLite. Which gems do I need to use here for Ruby and JRuby?

For the record, I’m using Ubuntu 11.04, Ruby 1.9.2-p290, JRuby 1.6.4, and Rails 3.0.9 or 3.0.10.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:47:33+00:00Added an answer on May 26, 2026 at 8:47 am

    We ported a large Rails application to JRuby last year and it was a surprising amount of work. Granted, part of it had to do with the app being rather badly written and having lots of legacy code, but still. In case you wonder: most of our problems came from gems we used, which then sometimes depended on e.g. FFI that didn’t properly work with JRuby at that time. A port to Rubinius I did a little later seemed a lot less painful, but was abandoned in favor of staying with MRI.

    For the Gemfile, there’s a platform option you can use. Here’s an example from the Bundler docs:

    gem "weakling",   :platforms => :jruby
    gem "ruby-debug", :platforms => :mri_18
    gem "nokogiri",   :platforms => [:mri_18, :jruby]
    

    It also has a block form:

    platforms :jruby do
      gem "foo"
    end
    

    Either form works well, since

    All operations involving groups (bundle install, Bundler.setup,
    Bundler.require) behave exactly the same as if any groups not matching
    the current platform were explicitly excluded.

    As a gem for MySQL I’d use the aptly named mysql, there seems to be a jdbc-mysql for JRuby.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we have a mixed development environment using ASP.NET MVC and Ruby on Rails. We
I have installed RubyMine on Mac but my development environment for Ruby and Rails
I have a ruby on rails application and it would be nice to see
I currently have a Ruby on Rails system, and there are plans to port
I'm trying to load up rails in the test environment using a ruby script.
I am learning and have already set up a Ruby on Rails environment based
I am setting up a development environment for ruby on rails. Using rails 3.0,
I have ruby on rails installed on my ubuntu 8.10 desktop. Script/generate came up
I have a Ruby on Rails Website that makes HTTP calls to an external
I have a ruby on rails app running a server and sometimes it needs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.