The End is Nigh: Help Squash Rails Bugs
My friends, the end of the road is in sight for official Rails support.
Tom, Ola, and I have been working over the past week to get remaining Rails issues wrapped up. As a result of our efforts:
So here is a set of instructions on how YOU, dear reader, can help round out JRuby's support for Ruby on Rails.
Update: A couple folks pointed out that the codebase didn't compile under Java 1.4.2. That has been corrected!
Update 2: A few folks are seeing a problem installing gems related to the %p operator to printf. We're working on that, and it's a fairly minor issue, but to avoid it there's one additional step before you install rake: set the JRUBY_HOME env var to the root of your JRuby stuff.
Tom, Ola, and I have been working over the past week to get remaining Rails issues wrapped up. As a result of our efforts:
- ActionPack is now "practically" 100% working, minus a test or two we can't support and a few tests that are broken or that run fine in isolation (it would be nice to know *why* those fail)
- ActiveSupport is well above 95% passing
- ActiveRecord is in the 90% range passing with MySQL and in the 80% range with Derby
So here is a set of instructions on how YOU, dear reader, can help round out JRuby's support for Ruby on Rails.
- Getting a testbed set up
- Update JRuby trunk (http://svn.codehaus.org/jruby/trunk/jruby), build it (ant clean jar), love it
- Install Rake (gem install rake)
- Fetch Rails 1.2.1 from Rails SVN at http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-1/
- Running the tests
- From within the module under test (like activesupport/ or actionmailer/) just run "rake". All tests should execute and a report should be provided at the end. You can usually run tests individually as well, although a few depend on the side-effects of previous tests.
- ActiveRecord requires some additional setup; I'll update this post with Tom's instructions and patches shortly.
- Reporting issues
- Reporting failures in Rails is good
- Reporting reduced test cases or clear explanations for failures in Rails is better
- Reporting reduced test cases and including patches for failures in Rails is BEST
- Don't forget to check if your issue has already been reported, and please sync up on the mailing list while you're working
- Patches will probably not be accepted without a reusable test case. We're trying to grow our regression suite as a result of this work.
- JRuby's JIRA is here: http://jira.codehaus.org/browse/JRUBY
- Caveats, things to watch for, things to try
- ActiveRecord (with the AR-JDBC adapter) could use wider DB testing. We've done quite a bit of work with MySQL and Tom has been improving Derby support, but there are lots of other databases out there. Pick your favorite database, follow Tom's instructions to get up and going, and report issues (in the JRuby JIRA at least, but also report to jruby-extras project if appropriate)
- Railties includes code that will never run under JRuby, like its fcgi-based dispatcher tests. You should confirm with us that they're expected, and then ignore or delete them for your future runs.
- Rails is a very...interesting...application to debug. Feel free to ask on-list if you simply don't get something. I've seen things in Rails code no man should have to see, so I know it can be frustrating to debug at times.
Update: A couple folks pointed out that the codebase didn't compile under Java 1.4.2. That has been corrected!
Update 2: A few folks are seeing a problem installing gems related to the %p operator to printf. We're working on that, and it's a fairly minor issue, but to avoid it there's one additional step before you install rake: set the JRUBY_HOME env var to the root of your JRuby stuff.
Written on January 31, 2007