I'm just trying to understand the factors that are considered to decide that an application written in a lower version needs to be upgraded.
I would like to think it comes down to these factors:
The Rails team is pretty active and they remedy Rails core security issues as soon as they come across one. It would be nice to have your Rails version always updated which means your have all the security issues of the past addressed as well as open to further updates if they come along. You would not want an older version of Rails get in the way of a security update.
There are always performance improvements in almost every new version of Rails and optimization is an area to work in for Rails apps. You should take advantage of them by keeping your Rails version updated.
Its not only the Rails version, the underlying Ruby version also receives updates and performance improvements. The updated version of Rails makes use of these.
There is also the gem dependency issue. Gems also receive updates and security patches and at times, newer versions of these gems are not compatible with an older version of Rails.
It is easier to upgrade a Rails application to its next version than to its next|next|next|next version. Blog posts and migration guides are always online but if you are coming from a very very old Rails version, they will become very hard to follow.
Newer versions of Rails provide functionality that is not available in the older versions of Rails. It is always nice to have this functionality at your disposal. You never know you may need it in your project.
Related
I need to develop a rails app. I am confused on which version should I use for develop 4.2 or 3.2.
If I develop on Rails 4.2 will it be compatible with Rails 3 or higher version because we are developing the app as a product.
I don't understand well your issue. Are you developing from scratch? Then you should use the last stable version (4.2) because you will have support for a longer time. Anything that you code and test will work.
Version problems come when you already have some code and want to update your Rails version while keeping old code, example: You have an old Rails 3 app and for some reason you want to migrate it to Rails 4.
Even then, if you have different existing rails apps in your server, you can use RVM to have them all living at the same time.
It seems there are some concepts missing here: The main problem you have is with your Gemfile and probably some of the new syntax introduced in Rails 4. You just shouldn't be moving code between Rails app which have different versions, that's all.
I have been working with rails 2.3.5. I am gonna start a new project on rails. Should i continue using the earlier version or should i hop on to rails > 3 ? If so which is the more stable version?
It is better to use rails 3.0.x version as these days lot of new plugins(like active_reload) are targeted only for 3.x version.
3.1.x have lot of cool features(like asset pipeline, saas integration, coffescript integration, etc), but its still a release candidate and I faced some issues while using it. I guess we have to wait for the stable 3.1.x release.
I have been using 3.0.7 for a while and found it to be very stable.
3.0.10 is recently released and you can easily upgrade to it from 3.0.7 any time you want in the future.
If you are stuck to 2.x version you will be missing cool features like mentioned here: http://net.tutsplus.com/tutorials/ruby/5-awesome-new-rails-3-features/
For a new project, I would use Rails 3.1 or for a bit more stability, 3.0.7. There are some noticeable differences compared to 2.3, but it will be supported for longer and most development of new gems and documentation are being written for Rails 3.
You should definitely NOT use 2.3 and earlier.
The Rails framework is improving at a steady pace and if there is a downside to that is that it can be a pain to upgrade from version to version, especially as regards to major version changes which introduce tons of backward incompatibilities.
Why then would you want to put yourself in the hole at the get go.
Another issue is how ready and mature is the ecosystem (ruby, popular gem packages, etc.). This leads you to consider whether you should start with 3.0.10 or 3.1 release candidate.
It turns out the great majority of gems working with Rails 3.0 is also working fine with Rails 3.1.
The little downside is that 3.1 is still in release candidate status but it's all but ready for final release and that should come within a matter of days or maximum a couple weeks (as of today Aug. 25, '11).
I would strongly recommend you start all new apps with 3.1. That's what I'm doing.
Disclaimer : I am totally new to Ruby on Rails but planning learning it.
This morning I have been reading there were two new Ruby On Rails releases (2.3.11 and 3.0.4).
I don't understand why people (the ROR community) are working (maintaining) different versions ? What are the benefits for developpers ?
Active development is not being done on the 2.x branch. However, there are lots and lots and lots of deployed 2.x applications in the wild, and given that yesterday's releases were security-related patches, they provided a patch for 2.x users.
Upgrading a Rails application from 2.x to 3.x is not necessarily easy or trivial, and it's unreasonable to expect that as a solution to a security hole, so the 2.3.11 release was made instead.
The benefit is for people who are still using the old version and for some reason does not want to or cannot upgrade to a newer version. It is standard practice that there is some maintenance of old versions.
Anyone seen any tangible metrics or sites that talk about the percentages of Rails apps in production that are using Ruby 1.8 vs Ruby 1.9?
In other words, we're contemplating back support for 1.8 but want to know if it's really worth it.
Thanks!
Chad
If you already have a 1.8 application that is running fine then there may be reasons to wait before switching (Plugin incompatibility mainly).
If the application is already written in 1.9 then don't bother. 1.9 is such a large improvement (particularly in regards to performance) over 1.8 that there's no sense in building a 1.8 application. Any webhosts that do not yet support 1.9 are definitely going to support it soon since I can't think of anyone building a new application in 1.8 but I can think of half a dozen people building new apps on 1.9.
There are enough differences between the two that maintaining compatibility for both would be a chore for large applications. In particular, you would need to run your unit and functional tests twice (once for each platform).
We can't know how much site use Ruby 1.9. But the railsplugins website try to say if plugin is or not compatible with Ruby 1.9
There a really less hosting service with Ruby 1.9 compatibility. Heroku try to be compatible in beta and EY try too. But it's not compatible :(
NewRelic occasionally release a "State of the Stack" report, showing who's using what version of Ruby in production, along with other Rails usage metrics. The latest can be found at http://blog.newrelic.com/2011/09/28/state-of-the-stack-a-ruby-on-rails-benchmarking-report-sept-2011/
A client is indicating that the Rails version I have installed on my Ubuntu servers (2.3.4) is not backward-compatible with the older Version 2.3.2.
I want to know if that is true or not before I attempt to install the older Rails.
the beauty of rubygems. just install both versions and have them specify which version in their environment file problem solved who cares if its compatible or not
New features are never backward compatible.
Well, it is possible that you are using features that are only available on version 2.3.4 , and therefore they're not on version 2.3.2.
Check its changelog to see the differences.
Upgrading between even minor Rails versions often causes problems with old apps.
That said, 2.3.4 is the current recommended stable version so it would probably be worth biting the bullet and getting the 2.3.2 app running on it. Probably won't take very long, if you've got a decent test suite.
There are also a few of bugs that are introduced. Like this one I found involving named scopes using includes. That was introduced in 2.3.3 and wasn't fixed in 2.3.4
2.3.2 => 2.3.4 has been the most painless upgrade so far for us (large app with lots of legacy, rails 1.x code).
The only major issues we had were with after_initialize vs exists?.
It all varies app by app. If you are hosting a client's app, then you should provide gems of all rails versions (they will happily sit side by side (90% of the time)).