Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the latest stable Rails version?

What is the latest stable version of rails? I want to install rails 3.1 but I see there is 3.1.3 now, what is the difference? What ruby version is it most compatible with?

like image 767
Jason Blade Avatar asked Dec 01 '11 14:12

Jason Blade


4 Answers

I recommend to always check on GitHub via the "branches" menu what the latest version is on each branch. You can see the latest version easily by checking the contents of the RAILS_VERSION file

https://github.com/rails/rails

You could also check RubyOnRails.org, but looking at the source code is the most reliable way.

If you already have a Rails App in production, I would highly recommend: don't just blindly take the latest version just because it just came out -- there were many cases in the past where a new version introduced incompatibilities or new bugs which were serious enough to have to wait for a fix before the features in the Rails release were really usable. I know a couple of people who have Production sites and still run 3.0.11 or lower, rather than 3.l.x

Again: check on GitHub under "Issues" which open Issues there are for a release, and/or google "Rails 3.y.z Problems" with the exact version number, so you get a feel of what problems could be introduced by upgrading to a new / the latest version.

On Wikipedia they have a list of historic release dates for the major Rails versions: https://en.wikipedia.org/wiki/Ruby_on_Rails

like image 182
Tilo Avatar answered Oct 17 '22 03:10

Tilo


The Rails version numbers have been explained reasonably well (Joseph Le Brech's answer), but the Ruby version numbers are slightly confusing and I could see why it's not really obvious what's going on there.

Joseph's explanation of Rails version number scheme is correct for Rails, but Ruby has a slightly different approach

1.9.3 is the most recent version of Ruby. Having said that, it was only released maybe a month ago, so it's possible there are breaking issues with certain gems. (Yes, there were breakages. Ruby in general will introduce breaking things between hotfix releases, and it's true here too)

1.9.2 is a more tried and true version of Ruby, having been out for at least 6 months now.

1.8.7 is the last version in the Ruby 1.8 line. Major language rework happened between 1.8 and 1.9, so some older gems may not have made the transition.

My recommendation: use Ruby 1.9.2 and Rails 3.1.3, unless you have really good excuses not to.

Ruby 1.9.2 is probably the safest bet for a Rails newbie, or green-field projects (projects without a lot of preexisting code). Rails 3.1 is an excellent version of Rails, which solves a lot of problems I had with the framework.

Rails 3.1 was released this fall, so old tutorials won't work, or will give odd errors. Try to look and read what version of Rails the book/tutorial/website/blog entry is talking about, before you dive in.

like image 37
RyanWilcox Avatar answered Oct 17 '22 02:10

RyanWilcox


Latest stable release is always shown on the Ruby on Rails website's home page here http://rubyonrails.org/

like image 2
jamesc Avatar answered Oct 17 '22 03:10

jamesc


To list all rails versions by gem:

gem list -ra rails | grep -G "^rails\ "

It's also helpful for cheeking what is the latest version for 4.x, 3.x and 2.x too.

like image 2
ohho Avatar answered Oct 17 '22 02:10

ohho