Did anyone tried with jruby 1.6.5 to work with rails 2.3.10 or 2.3.x version ?
it sure is and I recommend you go with the latest 1.6 which is 1.6.8
jruby-1.6.x is ruby 1.8.7 compatible which is "ideal" for rails 2.3.x
try running jruby -v you'll get something like:
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Server VM 1.6.0_32) [linux-i386-java]
reporting ruby-1.8.7-p357 compatibility (in --1.8 mode) ...
if you're about to use a Java webserver such as Trinidad (or Warbler) that uses JRuby-Rack as the compatibility layer between Rack/Rails and Servlets be sure to use (~> 1.1.13) 1.1.13.3 it's (backwards) compatible with all JRuby 1.6.x and runs Rails 2.3x (as well).
Well, I would just give it a try. JRuby 1.6.5 tries to be complient to Ruby 1.9.x, so the real question could be one of these:
is Ruby 1.9 compatible with rails 2.3?
Is it feasible to use Ruby 1.9 for Rails yet?
I don't remember what you had to to to use Rails 2.3.x, but if should be similar easy to do the following steps (if you have used rvm to install JRuby 1.6.5):
rvm use jruby1.6.5
Start your ruby application.
Add the gems that are missing by doing: gem install <missing-gem> -r
And as the real answer: No, I did not try to use JRuby 1.6.5, because I switched all Rails apps to 3.x long before JRuby 1.6.5 came out.
Related
hi I have one application in ruby but in that application developed in ruby 1.8.7, now I am using ruby 1.9.2 any possibility to change my application 1.8.2 to 1.9.2 or 1.9.3
Hope this tutorial is helpful to start working on upgrading your application to Ruby-1.9.3
He explained nicely how to upgrade from Ruby-1.8.7 to Ruby-1.9.3
Given that your rails app is using day-to-day ruby functions, upgrading to ruby 1.9 should not be an issue, however read this major changes note, from ruby 1.8 to 1.9.x and see if you are using any methods that are mentioned there. But practically in most cases your rails app should run without any modifications.
And when you are installing ruby1.9.x use RVM (Ruby Version Manager) , to have your both ruby 1.8.7 and 1.9 versions side-by-side.
and if you have a good test suite, this should not be a problem at all :)
best of luck
I have just downloaded an app that is based on Rail 2.2.0 which is included in the app. I have just upgraded to Ruby 1.9 and I still have Ruby 1.8 on my machine. Is there a way I can tell this app to use Ruby 1.8 vice 1.9? Would it be easier to decouple the app from Rails 2.2.0 and upgrade it to Rails 2.3.6? If changing the rails would be easier, how do I do that?
You could use RVM (Ruby Version Manager) which is a command line tool which allows you to easily install, manage and work with multiple ruby environments from interpreters to sets of gems.
That way you can have a different set of gems (including Rails) under Ruby 1.8 and a different set of gems under Ruby 1.9.
I have developed a Ruby on Rails application and successfully deployed on Weblogic using Jruby and Warbler (which creates a war file based on the settings in config/warble.rb).
I believe although Jruby comes with inbuilt Ruby 1.8 and 1.9, by default it uses 1.8 and I want to test the same rails application in Ruby 1.9 within JRuby as I heard that Ruby 1.9 is a lot faster than 1.8. I do not see any configuration option in warble.rb
where we can specify to use Ruby version to use. Whats the best way to force Jruby to use Ruby 1.9?
Also my Rails application is based on Rails 2.3.2, are there any compatability issues on running rails application (built on 2.3.2) on Ruby 1.9? If so will upgrading rails to 2.3.5 solve the problem?
Thanks in advance.
you specify it as an argument on the command line
jruby --1.9 -v
Don't know about the compatibility issues.
I follow configuration guide of JRuby https://github.com/jruby/jruby/wiki/ConfiguringJRuby and it work.
Create .jrubyrc in user directory (C:\Users\tvo1510 on Window 7) with content:
compat.version=1.9
It's done.
Cheers,
in config/warble.rb, look for this line:
# config.webxml.jruby.compat.version = "1.9"
uncomment it and re-run warble.
If so, how?
When you go to http://rubyonrails.org/download, it says:
We recommend Ruby 1.8.7 for use with
Rails. Ruby 1.8.6, 1.8.5, 1.8.4 and
1.8.2 are still usable too, but version 1.8.3 is not.
Rails does work in 1.9 as of 2.3. I suppose they still recommend Ruby 1.8.7 because it has the most compatibility with other Ruby libraries — a lot of them are still catching up.
From the announcement of Rails 2.2:
Jeremy Kemper has been rocking on both Ruby 1.9 and JRuby compatibility. Rails 2.2 is fully compatible with both, but again, there might be supporting libraries and gems that are not. Again, lots of work is going into making everything else fully compatible as well.
Then, from the release notes for Rails 2.3:
Rails 2.3 should pass all of its own tests whether you are running on Ruby 1.8 or the now-released Ruby 1.9.1. You should be aware, though, that moving to 1.9.1 entails checking all of the data adapters, plugins, and other code that you depend on for Ruby 1.9.1 compatibility, as well as Rails core.
Based on their discussion board, Rails 2.3.0RC1 and later versions are compatible with Ruby 1.9.1 (and presumably, any later 1.9 versions). I'm guessing they haven't gotten aroudn to updating the site properly.
Rspec has only recently been ported to 1.9, therefore many gems have not been able to run their test suites in 1.9 until recently, so many gems are not yet stable in 1.9
Ruby 1.9.1 RC1 was released today so I quickly moved to install it (a test version of course using a suffix of 19). I install Rails and Rack for the 1.9 RubyGems and then create a new Rails site using edge... when I execute:
ruby19 ./script/server
I watch as the processor usage goes up to 99.8 and the terminal just sits there. Trying to run Rails 2.2 using 1.9.1RC1 gives all sorts of fail on the inflector. I was under the impression that Rails 2.2 was 1.9.1 compatible. Is anyone successfully testing Rails under Ruby 1.9.1 or are you seeing similar errors?
The same thing for me.
I'm running the latest edge rails under webrik and just see the blank screen and no response to Ctrl-C. Rails 2.2 isn't working at all.
Also, I've tried run edge under thin (with eventmachine from github fixed to build on ruby 1.9.1, except one broken ruby test - I've just added empty one with 'assert true').
After that, both webrick and thin crashes immediately with:
$ /usr/local/bin/ruby script/server
/usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.3/lib/rubyeventmachine.bundle: [BUG] Bus Error
ruby 1.9.1 (2008-12-30 patchlevel-0 revision 21203) [i386-darwin9.6.0]
So, I guess, we all need calm down now. There still much work to actually run our rails apps under 1.9.1. Many gems are still at the early stages of bringing compatibility with 1.9.1
Actually, rails 2.2 is not fully compatible with ruby 1.9.1, just a basic compatibility, according to rails core team :)
Full compatibility claimed in upcoming rails 2.3.
I have written a guide on using Rails edge (near enough to 2.3) and Ruby 1.9.1. mysql, postgres and a few other gems like hpricot, thin and mongrel don't work, but the application does work.
Rails 2.2.2 is not compatible with Ruby 1.9.1rc1 when processing characters and strings on ActiveSupport. Rails uses multibyte to support unicode char-set, in other hand Ruby 1.9.1 uses built-in unicode support. Supported versions is 1.8.5 to 1.8.7.