Rails 2.1: Time zones, dirty, caching, gem dependencies, caching, etc

Posted by David June 01, 2008 @ 02:12 AM

Rails 2.1 is now available for general consumption with all the features and fixes we’ve been putting in over the last six months since 2.0. This has been a huge effort by a very wide range of contributors helping to make it happen.

Over the past six months, we’ve had 1,400 contributors creating patches and vetting them. This has resulted in 1,600+ patches. A truly staggering number. And lots of that has made it into this release.

New features
The new major features are:

Thanks to Ryan Daigle for the feature introductions and Ryan Bates for the Railscasts. It makes writing the release notes so much easier :).

As always, you can install with:

gem install rails

...or you can use the Git tag for 2.1.0.

Enjoy!

Posted in Releases | 87 comments

Comments

  1. Matt H on 01 Jun 02:44:

    Yay!

  2. Esma on 01 Jun 02:51:

    just in time for my new project

  3. Pete N on 01 Jun 02:56:

    Congrats to the Rails team!

    For the Diggers out there: http://digg.com/software/Rails_2_1_Released

  4. Eric Sendelbach on 01 Jun 03:11:

    I would give it a spin but am ‘going renaissance’ at the moment. Seriously though, thanks to everyone for the hard work!

  5. David Cornelius on 01 Jun 03:20:

    Thanks for not posting this during the day and further clogging up the tubes. :)

  6. mech on 01 Jun 03:29:

    Encounter this while gem install rails

    uninitialized constant RDoc::RDoc::Encoding

    Do we need some Ruby 1.9 thing here for any new RDoc encoding?

  7. Hussein Morsy on 01 Jun 03:30:

    Thanks for the 1,600+ patches. With git and Github, it is much easier to send a patch (see http://drnicwilliams.com/2008/02/03/using-git-within-a-team/)

  8. AkitaOnRails on 01 Jun 03:46:

    And don’t miss my tutorials on 2.1 as well. It was lots of fun to see it happening here at the RailsConf. Congrats!!

  9. Carlos Brando on 01 Jun 04:07:

    Wonderful! For brazilian guys: http://www.nomedojogo.com/2008/06/01/agora-e-oficial-ruby-on-rails-21/

  10. Mutati0N on 01 Jun 04:09:

    Congratulation , very nice work . keep it going , this will be the most powerful web application framework in the future .

  11. Kevin.Lee on 01 Jun 04:18:

    Great work! Congratulation !

  12. Mirko Froehlich on 01 Jun 04:28:

    Congrats on releasing 2.1! Time for us to upgrade from the 2.0.991 pre-release we’ve been using.

    For what it’s worth, I think Rails 2.1’s built-in support for incoming JSON requests is worth calling out as well.

    http://www.digitalhobbit.com/archives/2008/05/25/rails-21-and-incoming-json-requests/

  13. Pada on 01 Jun 04:40:

    Congrats ;)

    Just a little oopsie : the link for the railscast on migration should be episode 107 I think, not 109

  14. Anil on 01 Jun 05:36:

    Congrats contributors for the release!

  15. Si on 01 Jun 06:06:

    Excellent news. Congratulations!

  16. wosmvp on 01 Jun 07:00:

    Excellent news. Congratulations!

    _

  17. Chris Lloyd on 01 Jun 07:11:

    Awesome work. The front page needs to be updated though.

  18. primary0 on 01 Jun 07:27:

    great work! and many thanks.

  19. grigio on 01 Jun 08:43:

    Yiuppi, it’s time for git pull

  20. Morten on 01 Jun 08:47:

    Any list of deprecations this time?

  21. Luca Guidi on 01 Jun 09:37:

    Yeah! Congrats!

  22. Thomas R. Koll on 01 Jun 09:38:

    manual trackback: http://ananasblau.com/2008/6/1/single-table-inheritance-in-rails-2-1

  23. Damien Timewell on 01 Jun 09:55:

    Brilliant! Congrats on all the hard work to everyone who contributed!

  24. Thanks guys on 01 Jun 10:43:

    Well done guys, great work!

    Mikel

  25. hosiawak on 01 Jun 11:26:

    Go Rails! :)

  26. Ronair de Moura on 01 Jun 11:55:

    Ótima noticia nesta manha. Agora ninguém segura o Rails!

  27. João Batista on 01 Jun 11:57:

    Ok guys, greate work!

    New Projects, new version…

    Thanks.

  28. Arun Agrawal on 01 Jun 12:01:

    Congrats to the Rails team..!!!

  29. Fabio Espindula on 01 Jun 12:27:

    Awesome work =D

  30. Michael Christenson II on 01 Jun 13:41:

    Excellent! I just updated my barter project with this. This should prove extremely useful in speeding up my dev time.

  31. Jared Haworth on 01 Jun 14:30:

    Awesome! I’ve been looking forward to all the new features.

    http://alloycode.com/2008/6/1/rails-2-1-now-available

  32. Mark Karp on 01 Jun 16:53:

    Super!

  33. dejan.dimic@gmail.com on 01 Jun 17:00:

    Excellent! Congrats to the all Rails team..!!! Thank you once again!

  34. unnikuttan on 01 Jun 17:26:

    Your blog has lot of readers, I like your blog.

  35. jfbaro on 01 Jun 19:07:

    Great job!

    Congratulations from Brazil!

  36. Jason on 01 Jun 21:58:

    Anyone install this yet? New to rails and installed 2.0 the other day. Just tried running “gem install rails” and get the following error:

    ERROR: While executing gem … (Gem::RemoteSourceException) HTTP Response 302 fetching http://gems.rubyforge.org/yaml

  37. Nikolay Kolev on 01 Jun 22:23:

    Thanks for the great, hard work, guys!

  38. Edson on 01 Jun 22:55:

    Great! Congratulations

  39. Slckfty on 02 Jun 00:38:

    Wonderful news. I had no problem running

    gem install rails

    Great additions in the new version also.

  40. Thiago Pradi on 02 Jun 04:25:

    Yeah!

  41. Jmlover on 02 Jun 05:18:

    Greate!

  42. Ratnavel on 02 Jun 06:51:

    Congratulations for the great, hard work, guys.. Rails is getting more stronger…

  43. Diego Guillen on 02 Jun 06:58:

    Excellent work! Many thanks, domo arigatou, muchas gracias, muito obrigado.

  44. Wilco on 02 Jun 07:01:

    Congratulations people!

  45. Jim Neath on 02 Jun 08:22:

    Excellent news!

  46. Allen on 02 Jun 10:48:

    WOW! Hoping for today for a long time!

  47. Eric Berry on 02 Jun 15:06:

    Keep it up guys! Has anyone seen any slight performance issues with 2.1?

  48. Gary on 03 Jun 03:58:

    Great! Thanks a lot!

  49. YBA on 03 Jun 09:35:

    Vraiment super, GO RUBY !!!

  50. Christophe on 03 Jun 14:46:

    Impressive ! That’s an excellent news !

  51. George on 04 Jun 01:15:

    why on main page http://rubyonrails.org/ rails 2.0 is the version to download?

  52. Michael on 04 Jun 06:53:

    Good stuff, although i don’t like the decisions regarding :include. I think one should differentiate between an include on a has_many relationship in contrast to an include with belongs_to. The later should be always fetched with a (outer) join. For the has_many extra selects maybe ok, but for them i’d go with subselects.

    I didn’t have big problems upgrading, for those who are interessted, here are some words about 2.1 and PDF::Writer:

    http://info.michael-simons.eu/2008/06/04/pdfwriter-and-ruby-on-rails-21/

    Cheers and keep up the good work.

  53. Andrew Chalkley on 04 Jun 08:08:

    Hey,

    The release date on the home page for 2.1 is 31 May 2007, Rails is powerful but I didn’t realise that it could travel in time :)

    Andrew

  54. Stiles on 04 Jun 14:14:

    gem install activerecord-sqlserver-adapter—source=http://gems.rubyonrails.org no longer works with v2.1 (ERROR: could not find activerecord-sqlserver-adapter locally or in a repository)! However, on the Wiki we are told that beginning with Rails 2 the sqlserver adapter is longer installed by default … SO … how do we SQL Server guys get the adapter to work with Rails 2.1???

  55. George on 04 Jun 15:04:

    hmm.. first you release Rails 2.1 but dont update the front page, then you update the front page, but released day is 1 year ago.. hm… please understand me, it’s not that i’ve ever trusted hdd, but there is nobody to take care of this project?

  56. Jeremy Kemper on 04 Jun 18:12:

    @Andrew Updated the front page, thanks for the tip!

    @Stiles We had a gem repository issue and had to wipe the adapter gems. I’ll push them out again shortly.

  57. Jon on 04 Jun 22:20:

    @Jeremy… not being able to install the SQL adapter from the gem repo has been broken for over 3 months (probably longer).

    I ended up needing to dig into /System/Library/Frameworks.RubyFramework/blahblah until I got to the active-record-1.5.3 (or something) folder with the connection adapters. Luckily I had installed rails a while ago and it was still there. I SCP’d the sqlserver-adapter.rb to my Production Ubuntu machine and got everything working through FreeTDS, it was a hugely frustrating exercise though. Please fix this ASAP!

    Thanks for all your hard work on the core, I saw your keynote at rails conf… good stuff.

  58. Jeremy Kemper on 05 Jun 02:02:

    @Jon Ouch! Sorry about that.

    Pushed updated gems to http://gems.rubyonrails.org

  59. Arjun on 05 Jun 10:28:

    Nice work guys…

  60. AkitaOnRails on 05 Jun 11:47:

    Please, follow my 2 parts tutorial on Rails 2.1:

    http://www.akitaonrails.com/2008/5/25/rolling-with-rails-2-1-the-first-full-tutorial-part-1

    http://www.akitaonrails.com/2008/5/26/rolling-with-rails-2-1-the-first-full-tutorial-part-2

  61. Achithyn on 05 Jun 18:49:

    Just wanted to give you guys a huge, “thank you” for all the hard work. I really appreciate the effort the community and rails core team has put into these updates. Runs off to learn more about the update :o)

    ~Achithyn

  62. Ernie on 05 Jun 20:34:

    I’ve got a short writeup on how to update DATETIMEs in MySQL for those who weren’t storing them in UTC before.

    http://thebalance.metautonomo.us/2008/06/02/updating-mysql-datetimes-for-rails-21-time-zones/

  63. DHH on 10 Jun 11:26:

    damn, it works!

  64. Pedro Pimentel on 10 Jun 12:32:

    Hey!

    First Rails 2.1 Book is out there, and it`s free!

    Download it now! http://tinyurl.com/3wfvbo

  65. Chris on 10 Jun 12:37:

    The changed behavior of ActiveRecord :include is VERY worrying. I use Oracle and work with massive datasets and this will almost surely slow things down. I hope there is a way to use the old style queries. Is there?

  66. Mason on 10 Jun 17:05:

    The :include behaviour doesn’t just worry me… it also breaks a bunch of my junk:

    http://pastie.org/212351

  67. DHH on 11 Jun 02:35:

    If you’re seeing breakage, please do create tickets for it.

  68. Ashley on 11 Jun 17:12:

    Cool! Installing the gem now, lets see if my app breaks! ;)

    Thanks to all the core developers and contributors!!

  69. Brian on 11 Jun 22:14:

    After updating to 2.1.0, my web application running on Locomotive and OS X Tiger is completely broken! When I go to the URL I now get “Unable to connect— Firefox can’t establish a connection to the server at localhost:3003.”

    What do I do? Please advise.

    - Brian
  70. Bill on 13 Jun 00:03:

    Congrats on the update.

    -Bill

  71. Mike on 15 Jun 22:46:

    Cool – some of these changes sound really interesting, and I can’t wait to use named scope in my applications.

    I do think you guy should try and make this information easier to find. A “changelog” link next to the download on the downloads page would be nice – I had to use google to find this blog post after poking around rubyonrails.org for abit.

  72. AManWithStrangeName on 16 Jun 16:31:

    It seems that http://dev.rubyonrails.org/ticket/3365 is back. When

    config.action_controller.session_store = :mem_cache_store

    is used then a new memcache client instance and connection is created. Very painful. Degrades performance on every project we use. Has the cache refactoring in 2.1 brought this issue back? I have no time to play with your issue tracker, so someone who is registered there may put this info.

  73. AManWithStrangeName on 16 Jun 16:36:

    ”...then a new memcache client instance and connection is created” for each request

  74. Ngoc Sâm on 17 Jun 02:17:

    wrong number of arguments (3 for 2)

    Extracted source (around line #1):

    1: <%= date_select(“user”, “birthday”, :start_year => 1980) %>

    Source: <%= date_select(“user”, “birthday”, :start_year => 1980) %>

  75. Jimmy on 19 Jun 01:14:

    What is the changed behavior of ActiveRecord’s :include that some commenters are referring to? Where is it documented?

    I’d like to know before touching the new version.

    Thanks, Jimmy

  76. chrisff on 24 Jun 06:02:

    Anyone else getting this?

    $ sudo gem install rails ERROR: Error installing rails: invalid gem format for /usr/local/lib/ruby/gems/1.8/cache/activesupport-2.1.0.gem

    2.0.2 is installed and working. Using gem v1.2.0 on Leopard

    deleting the cached gem and retrying doesn’t help.

  77. pentor on 24 Jun 14:45:

    Same problem here as chrisff also today… could it be a bug in that file or in the repository?

  78. Vincenzo Acinapura on 24 Jun 15:08:

    Same problem here, I’ve installed rubygems 1.2.0 and ruby 1.8.7-p22. When I try to install rails, I get “invalid gem format for /usr/local/lib/ruby/gems/1.8/cache/activesupport-2.1.0.gem”

  79. JoeTheIntern on 24 Jun 16:12:

    Exact problem as chris, pentor and Vince – it was driving me crazy. Deleting the cache did not help – the gem magically reappears each time.

    I managed to install ActiveSupport 2.1.0 by downloading from its rubyforge project page manually and installing locally, and then “gem install rails” goes through just fine. Looks like a bad repository version to me.

    Was upgrading from Rails 1.2.3 on Vista, using RubyGems 1.2.

  80. TomH on 24 Jun 19:21:

    I used @JoeTheIntern’s instructions and was able to resolve the problem.

    http://rubyforge.org/projects/activesupport/

    Download gem to a local file, then

    sudo gem install—local activesupport-2.1.0.gem

    All fixed.

    Thanks Joe!

  81. wax_man on 24 Jun 21:06:

    Same as TomH. Thanks much Joe.

  82. wax_man on 24 Jun 21:55:

    So, are you guys ever going to actually use http://www.rubyonrails.org/deprecation? There’s barely anything of use on that page, and I had to sift through your changelogs to fix code. I just installed Rails2.1, and upon starting my server got a wonderful Deprecation Warning about cache_template_extensions, and the message says ‘See http://www.rubyonrails.org/deprecation for details’. Don’t get me wrong, I’m glad the deprecation message was there AND I appreciate everything everybody involved with this project has done, but what details? the /deprecation page is nearly useless. Not to mention you use some deprecated code inside the Rails core code. url_for, Object#type, among others. Once again, I appreciate the RoR framework and community, but don’t you think you guys have more of a responsibility to the community you created? Eh, David? Please don’t take it the wrong way, I’m just frustrated with the lack of easily accessible documentation of changes, especially convention changes. If I’m the only person who has had these issues, I’ll gladly take my own shoe and eat it.

  83. pentor on 25 Jun 08:36:

    Yesss, JoeTheIntern’s solution worked for me too. Thanks

  84. Medyk on 25 Jun 23:01:

    Other tip to JoeTheIntern’s instructions – after you download activesupport-2.1.0.gem.tar make sure you rename it to activesupport-2.1.0.gem before installing it

  85. cesidio on 26 Jun 14:21:

    I also have the same problem with activesupport-2.1.0.gem so I managed to install ActiveSupport 2.1.0 by downloading from its rubyforge project page manually and installing locally.

    there is still a problem though when I rake rails:freeze:gems

    Freezing to the gems for Rails 2.1.0 ERROR: While executing gem … (Gem::InstallError) invalid gem format for /Library/Ruby/Gems/1.8/cache/activesupport-2.1.0.gem

    what about you guys?

  86. sathish on 27 Jun 11:10:

    I’m getting a crazy error on rake rails:freeze:gems (in windows)

    rake aborted! Permission denied – activerecord-2.1.0 or activerecord.

  87. sathish on 27 Jun 11:32:

    fortunately it gets solved by executing rake rails:freeze:gems—trace (bit funny again!)