Should I use Rails 3 or 4 for my new project?

I’m working on website that uses rails for content management. Due to the nature of client and their requirements, the existing CMS on rails were not a suitable candidate. So it’s decided that we build a very light weight editing feature for each models (similar to the one given by scaffolding models but done better). The project started just a month back and we used Rails 3.

Is it good to start with Rails 4 or stick rails 3 for now so that I get a good number of gem support for rails 3?

I am new to rails and had been previously with Drupal which takes about 6 months to 1 year to be usable (time period for most commonly used contrib modules to get ported to new version of drupal). Is Rails 4 ecosystem mature enough to start a new project?

I would use Rails 4 and Ruby 2. You get some nice improvements (especially with security and performance) and you won’t have to upgrade later. Rails 4 is mature enough – it’s building on the Rails versions that came before it, so it has the goodness of the earlier versions with additional improvements. This RailsCast should help you with Rails 4. Building in Rails 3 at this point, especially for a “Greenfield” project, is rather pointless, in my opinion. Unless there is some legacy technology that you have to support, there’s no good reason to use Rails 3, at least not a reason that I can think of. Of course, I could be wrong…

@shankard Yes, Rails 4 is the way to go. There may be some gems that haven’t been updated, but in general most stuff that you will want to use should work finr and you shouldn’t have too much trouble. Thanks.

thanks @cpytel and @briandear for your replies. I started with Rails 3 on a project a few weeks before just because some of the gems that I fit as very useful for my project like


are not available for rails 4, or at least not obvious if they work on rails 4.

Q1: Now how big is this task of converting a rails 3 gem to rails 4?

Q2: What is the convention to find out if a gem is ported rails 4? For example, paperclip has the rails4 branch but I am not sure if that is a fully complete branch or just a wip?

Q3: If I can convert a rails 3 gem to rails4, where I can begin?

The main thing I’ve had to do in Rails 4 gems is that some of them have Railties or Rails as a dependency that’s locked to a specific version. I just clone the gem, bump up the versions in the gemspec and then use the gem from one of my own branches. There are probably easier ways – you can also submit an issue for the gem in question via github and the maintainers may already have a solution. If a gem is “dead” and hasn’t been maintained in a while, then it’s probably best to find a new gem.