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
Related
In other words, can I run Rails 4.1.16 on Ruby 2.4? If not, can I run it on Ruby 2.3?
Based on the CI settings for 4-1-stable, I'd say stick with Ruby 2.3. 2.4.0 isn't on that list, as things stand.
That's not to say that 4.1.16 won't run on Ruby 2.4 - I can't really speak to that - but there's always a possibility that you hit subtle issues, depending on the features you use and the gems that you include. Ruby 2.4 has the Fixnum and Bignum unification, as well as unicode changes - which potentially could have an impact.
FWIW, we have a sizeable, battle-tested application on the 4.1.x branch that works just fine on Ruby 2.3.3.
seems 2.4 should work with rails 4.x
Rails generally stays close to the latest released Ruby version when
it's released:
....
Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
...
http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#ruby-versions
According to Rubygems, Rails 4.1.16 should work with any ruby version higher or equal to 1.9.3. I would recommend testing it extensively in a local environment so you can check for any possible deprecations.
Also, in case you are not, consider using RVM or any other Ruby version manager.
The Rails blog posted recently that the first version of the 4.2 series that officially support Ruby 2.4 is Rails 4.2.8.
First of all, I think it isn't a prohibited question on StackOverflow since it's a precise question about environment, an objective question. But if it's prohibited, please tell me.
Currently I'm developing a specific project that is using Ruby 1.9.3 and Rails 3.2.3, at the moment we can't upgrade to Rails 4 because the project dependencies.
My question is:
Using Rails 3.2.3, we can upgrade to a newest Ruby version? If so, what version: Ruby 2.0, Ruby 2.1.2 or another one?
Also, I searched on Google and StackOverflow and I don't find a question like that.
Thanks!
The first release of rails that officially support ruby 2.0 was 3.2.13 (see the announcement on the rails blog.
I deployed several applications running 3.2.15-3.2.17 and ruby 2.0 (They've since been upgraded to rails 4) without any problems that I recall.
The recently released 3.2.22 supports ruby 2.2 (announcement)
According to the Travis configuration, Rails 3.2.3 was only tested with Ruby 1.8.7, 1.9.2 and 1.9.3, so it doesn't seem to be a good idea to use a later version of Ruby (but you can always test it yourself.) However, Rails 3.2.3 has some known security vulnerabilities that have been patched in 3.2.19.
On the other hand, the configuration for Rails 3.2.19 does suggest that the developers expect it to work with Ruby 2.0.0. Your project might benefit from investing some effort to see if you can upgrade from Rails 3.2.3 to 3.2.19, and test a combination of that with Ruby 2.0 for your application, if there are new Ruby features that you need and cannot efficiently backport them. Bear in mind that the only recent answer to a similar question warns of 'weird issues' from such a combination. Also consider that the latest Rails 3.2 release notes do not mention Ruby 2.0.
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 should upgrade a Rails App 2.3 running with ruby 1.8 to ruby 1.9.1.
Rails 2.3 support ruby 1.9.1 without problem, but I am using many Gems (spec, capybara, authlogic, ...), and I am losing a lot of time checking the gems's documentation, but not always it's clear if they support ruby 1.9.1
The question is:
what do you do to check if a gem supports ruby 1.9.1 ?
thank you
There's two good resources that I know of for this.
One is http://test.rubygems.org/ where you can see the results of test runs for gems on different architectures and versions of ruby as submitted by the community.
The other is http://isitruby19.com/. Another community powered site where you can see what gems are reported to run (or not) on Ruby 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.