views:

167

answers:

4

Can I use Rails 2.3.3 with Ruby's latest version (1.9.1)? On this page, they recommend Ruby 1.8.7.

+6  A: 

I believe that's the official RoR website, so I would probably follow their advice:

We recommend Ruby 1.8.7 for use with Rails.

Telemachus
+1  A: 

Some of the rails plugins won't work on Ruby 1.9. If you want to work with Ruby 1.9 you might as well use Rails 3. I've tried Rails 3 with Ruby 1.9 and it works great.

jpartogi
A: 

I am using Ruby 1.9.1p129 with Rails 2.3.3 and other than a monkeypatch to Net::HTTP for ActiveResource, it seems stable enough with some great speed benefits.

The latest version of Ruby 1.9.1 will NOT work with Rails unless you monkeypatch tempfile to get Passenger to work, whereas the monkeypatch for Net::HTTP seems safe enough

module Net
  class HTTP < Protocol
    alias_method :use_ssl, :use_ssl?
  end
end

compared to:

--- lib/tempfile.rb     23 Jul 2003 16:37:35 -0000      1.19
+++ lib/tempfile.rb     5 May 2004 23:33:57 -0000
@@ -106,7 +106,10 @@ class Tempfile < SimpleDelegator
   # file.
   def unlink
     # keep this order for thread safeness
-    File.unlink(@tmpname) if File.exist?(@tmpname)
+    if File.exist?(@tmpname)
+      closed? or close
+      File.unlink(@tmpname)
+    end
     @@cleanlist.delete(@tmpname) if @@cleanlist
   end
   alias delete unlink
Omar Qureshi
+3  A: 

I think that Rails 2.3.3 has been tested and works nice with ruby 1.9.1 . However you will have problems most probably with some other libraries.

In fact you can check what people say about ruby 1.9 and the different gems/plugins on this site - http://isitruby19.com/

Stanislav