Rails 2.2 RC2: Last stop before final
Posted by David November 14, 2008 @ 03:55 PM
Rails 2.2 has been baking for long enough now. This is the last taste before the goodies are served. So please install and check it out. See if you can find any regressions or bugs in any of the new stuff, so we can have it all delicious by the time we ring the dinner bell (ok, ok, I’ll put down the food metaphor now).
This release also conciedes with the fact that we’ve branches 2-2-stable, which means that master is now actually targeting Rails 2.3/3.0. There’s also a tag available for this RC as v2.2.1.
If you missed RC1, have a look at the Rails 2.2 release notes to see the major additions. You can see what’s new since RC1 in these two This Week in Edge Rails.
To install, you must first have RubyGems 1.3.1:gem update --system.
Then you can:gem install rails -s http://gems.rubyonrails.org
Enjoy!

Good work, chaps.
Great job, seems we only have a few days left to finish Typo next version…
Why the RubyGems 1.3.1 requirement?
We tried running my 40000+ LOCs (100+ models) rails app with rails 2.2 and the memory leaks that probably don’t exist in rails but in our app increased the number of times we have to restart mongrels in production from 4 times a day to 4 an hour. They also increased the time needed to run single unit tests (some of us develop on windows) from around 5 seconds to more than 30 seconds. Somewere between 2.0 and 2.2 you also removed some functionality (I am talking about cache_view_templates) that in our specific setup is crucial: in windows and with a big app you want to minimize mongrel restarts and development mode doesn’t work because of some of the plugins that we have developed. I thought there was an effort to make rails lighter but from my experience it is quite the opposite.
I really appreciate all the hard work you’re pouring into rails but I will stick with 2.0.x for the time being.
@slnc : You should upgrade your application to the lastest 2.1.x before you use 2.2. Remove/replace all the deprecated code and then upgrade to 2.2.
good news, but for the last two years every time I upgrade ruby-gems I got some kind of error.
hope this time everything will be fine.
If you’re on Rubygems 1.2 when you do “gem update—system” you will get “Nothing to update” I describe the work around for this bug here: http://notch8.com/index.php/2008/11/08/update-rubygems-now/
@kelyar: if gem update—system fails try:
sudo gem install rubygems-update sudo update_rubygems
@Pratik: We fixed all the deprecated stuff because right after upgrading more than 400 tests were failing. The problems we found don’t seem to be the kind of problems that appear in logs :)
To provide some counter weight to the notion that Rails 2.2 has somehow become more “bloated” or “sucky”: we just ported a large app from Rails 2.1 to Rails 2.2. So far stability has been the same and the unit tests take the same amount of time.
@slinc: cache_view_templates is now merged with cache_classes. You don’t need the former anymore, so just remove it.
@hongli: Regarding total tests running time is roughly the same for us. The only problem is when you want to run a single test file instead of all the tests. In this case the amount of time taken to load the rails environment in windows has increased so much that for us it takes roughly 5x times longer to run.
We know cache_view_templates is now merged, that’s the problem. The problem is before you could say: cache everything except views and then work on views pressing f5 to check the changes without reloading the whole app. Now it’s not possible.
http://rails.lighthouseapp.com/projects/8994/tickets/740-actionmailer-does-not-set-body-charset-when-there-are-attachments !!! it’s 2 years old bug !!!
@Pawel : Thanks for the patch ! Usually, nudging someone in #rails-contrib or posting an email to the core mailing list helps a lot when your patch doesnt get any attention. DHH has already applied the patch.
Hi everybody
first, thank you for the upcomming version, I am looking forward and already have a 2.2.0 in a working production environment. :-)
For contributing a bit, I checked out the lighthouseapp ticketing system for open bugs.
I noticed, that it should be better organised, because many of reported bugs are marked as “new” even if they are “resolved” or non-bugs, but have a reply that answers the questions.
Wouldn’t it be better to mark these as closed, resolved or for example, explained non-bug. (whatever, but new oder open)
It would certainly simplify your work, also reporting.
what you think?
greetings
Ive installed rails 2.2.1, but now if i create a new application, i get an error from passenger sayng that i need to install 2.2.1… but it’s already installed… someone can help me?
@hongli lai regarding :To provide some counter weight to the notion that Rails….. Yes rails is great, but that statement doesnt mean or prove anything.
Andrea, do you use specific version of Ruby with passenger? If yes, then you’ll need to install 2.2.1 gem for that version.
How this version of Rails compares to other frameworks like Merb?
@Frameworkoh, its about 4 times as bloated as merb. LOC!!
I’m very excited about the nice interplay between merb and rails. it should make for nice advances in features and usefulness. thanks to the ruby community for being so diverse. I think that there are good days ahead.
Hi, strock, so installing using gem install rails -s http://gems.rubyonrails.org isin’t good? :)
Andrea, no, it’s good, but are you sure that it’s the gem from the same ruby installation which is used by PassengerRuby configuration directive in apache config?
Oh how delicious. I love goodies when they bake for long enough. Yum yum yum. Blah. Barf.
Thanks for the upcoming release.
Rails is getting more and more fun to work with.
Rails keeps showing the way. Nice work!
for some reason the “rake rails:update” doesn’t do anything for me.. Am I not supposed to be able to upgrade 2.2.0 projects to 2.2.1 like that?
I guess I could do it manually by changing the version in the environment.rb, but I thought that the rake command would do this stuff?
Oh silly kenny, Rails doesn’t do anything for me either. And yes sometimes we have to do it manually.
Just Updated to 2-2-stable from 2.2.0 and had to go through all our tests and change the files they extend from to ActiveSupport::TestCase, ActionController::TestCase etc. We also needed to rename application.rb to application_controller.rb. The 2.2.1 release needs a big disclaimer at the top mentioning this. Seems a little strange to be making drastic changes like this when you’re striving for stability.
Well, disregard my last comment, seems like rake rails:freeze:edge TAG=2-2-stable actually freezes the master branch. Is there a better way to freeze to rails 2.2.1 or do you have to do the git clone, then checkout 2-2-stable?
I updated gems but when trying to install rails i get:
ERROR: Error installing rails: rails requires rake (>= 0.8.3, runtime)
@rick First run gem install rake
@Rick
Tried,
sudo gem install rake -v=0.8.3 ?
good