Rails 2.0: It's done!

Posted by David December 07, 2007 @ 03:03 PM

Rails 2.0 is finally finished after about a year in the making. This is a fantastic release that’s absolutely stuffed with great new features, loads of fixes, and an incredible amount of polish. We’ve even taken a fair bit of cruft out to make the whole package more coherent and lean.

What a milestone for Ruby on Rails as well. I’ve personally been working on this framework for about four and a half years and we have contributors who’ve been around for almost as long as well. It’s really satisfying to see how far we’ve come in that period of time. That we’ve proven the initial hype worthy, that we’ve been able to stick with it and continue to push the envelope.

Before jumping into the breakdown of features, I’d just like to extend my deep gratitude towards everyone who helped make this release possible. From the stable of merry men in the Rails core to the hundreds of contributors who got a patch applied to everyone who participated in the community over the year. This release is a triumph for large-scale open source development and you can all be mighty proud of the role you played. Cheers!

With the touchy-feely stuff out of the way, let’s dig into the feast and look at just a sliver of what’s new:

Action Pack: Resources

This is where the bulk of the action for 2.0 has gone. We’ve got a slew of improvements to the RESTful lifestyle. First, we’ve dropped the semicolon for custom methods instead of the regular slash. So /people/1;edit is now /people/1/edit. We’ve also added the namespace feature to routing resources that makes it really easy to confine things like admin interfaces:

map.namespace(:admin) do |admin|
  admin.resources :products,
    :collection => { :inventory => :get },
    :member     => { :duplicate => :post },
    :has_many   => [ :tags, :images, :variants ]
end

Which will give you named routes like inventory_admin_products_url and admin_product_tags_url. To keep track of this named routes proliferation, we’ve added the “rake routes” task, which will list all the named routes created by routes.rb.

We’ve also instigated a new convention that all resource-based controllers will be plural by default. This allows a single resource to be mapped in multiple contexts and still refer to the same controller. Example:


  # /avatars/45 => AvatarsController#show
  map.resources :avatars

  # /people/5/avatar => AvatarsController#show 
  map.resources :people, :has_one => :avatar

Action Pack: Multiview

Alongside the improvements for resources come improvements for multiview. We already have #respond_to, but we’ve taken it a step further and made it dig into the templates. We’ve separated the format of the template from its rendering engine. So show.rhtml now becomes show.html.erb, which is the template that’ll be rendered by default for a show action that has declared format.html in its respond_to. And you can now have something like show.csv.erb, which targets text/csv, but also uses the default ERB renderer.

So the new format for templates is action.format.renderer. A few examples:

  • show.erb: same show template for all formats
  • index.atom.builder: uses the Builder format, previously known as rxml, to render an index action for the application/atom+xml mime type
  • edit.iphone.haml: uses the custom HAML template engine (not included by default) to render an edit action for the custom Mime::IPHONE format

Speaking of the iPhone, we’ve made it easier to declare “fake” types that are only used for internal routing. Like when you want a special HTML interface just for an iPhone. All it takes is something like this:


  # should go in config/initializers/mime_types.rb
  Mime.register_alias "text/html", :iphone

  class ApplicationController < ActionController::Base
    before_filter :adjust_format_for_iphone

    private
      def adjust_format_for_iphone
        if request.env["HTTP_USER_AGENT"] && request.env["HTTP_USER_AGENT"][/(iPhone|iPod)/]
          request.format = :iphone
        end
      end
  end

  class PostsController < ApplicationController
    def index
      respond_to do |format|
        format.html   # renders index.html.erb
        format.iphone # renders index.iphone.erb
      end
    end
  end

You’re encouraged to declare your own mime-type aliases in the config/initializers/mime_types.rb file. This file is included by default in all new applications.

Action Pack: Record identification

Piggy-backing off the new drive for resources are a number of simplifications for controller and view methods that deal with URLs. We’ve added a number of conventions for turning model classes into resource routes on the fly. Examples:


  # person is a Person object, which by convention will 
  # be mapped to person_url for lookup
  redirect_to(person)
  link_to(person.name, person)
  form_for(person)

Action Pack: HTTP Loving

As you might have gathered, Action Pack in Rails 2.0 is all about getting closer with HTTP and all its glory. Resources, multiple representations, but there’s more. We’ve added a new module to work with HTTP Basic Authentication, which turns out to be a great way to do API authentication over SSL. It’s terribly simple to use. Here’s an example (there are more in ActionController::HttpAuthentication):


  class PostsController < ApplicationController
    USER_NAME, PASSWORD = "dhh", "secret" 

    before_filter :authenticate, :except => [ :index ]

    def index
      render :text => "Everyone can see me!" 
    end

    def edit
      render :text => "I'm only accessible if you know the password" 
    end

    private
      def authenticate
        authenticate_or_request_with_http_basic do |user_name, password| 
          user_name == USER_NAME && password == PASSWORD
        end
      end
  end

We’ve also made it much easier to structure your JavaScript and stylesheet files in logical units without getting clobbered by the HTTP overhead of requesting a bazillion files. Using javascript_include_tag(:all, :cache => true) will turn public/javascripts/.js into a single public/javascripts/all.js file in production, while still keeping the files separate in development, so you can work iteratively without clearing the cache.

Along the same lines, we’ve added the option to cheat browsers who don’t feel like pipelining requests on their own. If you set ActionController::Base.asset_host = “assets%d.example.com”, we’ll automatically distribute your asset calls (like image_tag) to asset1 through asset4. That allows the browser to open many more connections at a time and increases the perceived speed of your application.

Action Pack: Security

Making it even easier to create secure applications out of the box is always a pleasure and with Rails 2.0 we’re doing it from a number of fronts. Most importantly, we now ship we a built-in mechanism for dealing with CRSF attacks. By including a special token in all forms and Ajax requests, you can guard from having requests made from outside of your application. All this is turned on by default in new Rails 2.0 applications and you can very easily turn it on in your existing applications using ActionController::Base.protect_from_forgery (see ActionController::RequestForgeryProtection for more).

We’ve also made it easier to deal with XSS attacks while still allowing users to embed HTML in your pages. The old TextHelper#sanitize method has gone from a black list (very hard to keep secure) approach to a white list approach. If you’re already using sanitize, you’ll automatically be granted better protection. You can tweak the tags that are allowed by default with sanitize as well. See TextHelper#sanitize for details.

Finally, we’ve added support for HTTP only cookies. They are not yet supported by all browsers, but you can use them where they are.

Action Pack: Exception handling

Lots of common exceptions would do better to be rescued at a shared level rather than per action. This has always been possible by overwriting rescue_action_in_public, but then you had to roll out your own case statement and call super. Bah. So now we have a class level macro called rescue_from, which you can use to declaratively point certain exceptions to a given action. Example:


  class PostsController < ApplicationController
    rescue_from User::NotAuthorized, :with => :deny_access

    protected
      def deny_access
        ...
      end
  end

Action Pack: Cookie store sessions

The default session store in Rails 2.0 is now a cookie-based one. That means sessions are no longer stored on the file system or in the database, but kept by the client in a hashed form that can’t be forged. This makes it not only a lot faster than traditional session stores, but also makes it zero maintenance. There’s no cron job needed to clear out the sessions and your server won’t crash because you forgot and suddenly had 500K files in tmp/session.

This setup works great if you follow best practices and keep session usage to a minimum, such as the common case of just storing a user_id and a the flash. If, however, you are planning on storing the nuclear launch codes in the session, the default cookie store is a bad deal. While they can’t be forged (so is_admin = true is fine), their content can be seen. If that’s a problem for your application, you can always just switch back to one of the traditional session stores (but first investigate that requirement as a code smell).

Action Pack: New request profiler

Figuring out where your bottlenecks are with real usage can be tough, but we just made it a whole lot easier with the new request profiler that can follow an entire usage script and report on the aggregate findings. You use it like this:


  $ cat login_session.rb
  get_with_redirect '/'
  say "GET / => #{path}" 
  post_with_redirect '/sessions', :username => 'john', :password => 'doe'
  say "POST /sessions => #{path}" 
  $ ./script/performance/request -n 10 login_session.rb

And you get a thorough breakdown in HTML and text on where time was spent and you’ll have a good idea on where to look for speeding up the application.

Action Pack: Miscellaneous

Also of note is AtomFeedHelper, which makes it even simpler to create Atom feeds using an enhanced Builder syntax. Simple example:


  # index.atom.builder:
  atom_feed do |feed|
    feed.title("My great blog!")
    feed.updated((@posts.first.created_at))

    for post in @posts
      feed.entry(post) do |entry|
        entry.title(post.title)
        entry.content(post.body, :type => 'html')

        entry.author do |author|
          author.name("DHH")
        end
      end
    end
  end

We’ve made a number of performance improvements, so asset tag calls are now much cheaper and we’re caching simple named routes, making them much faster too.

Finally, we’ve kicked out in_place_editor and autocomplete_for into plugins that live on the official Rails SVN.

Active Record: Performance

Active Record has seen a gazillion fixes and small tweaks, but it’s somewhat light on big new features. Something new that we have added, though, is a very simple Query Cache, which will recognize similar SQL calls from within the same request and return the cached result. This is especially nice for N+1 situations that might be hard to handle with :include or other mechanisms. We’ve also drastically improved the performance of fixtures, which makes most test suites based on normal fixture use be 50-100% faster.

Active Record: Sexy migrations

There’s a new alternative format for declaring migrations in a slightly more efficient format. Before you’d write:

create_table :people do |t|
  t.column, "account_id",  :integer
  t.column, "first_name",  :string, :null => false
  t.column, "last_name",   :string, :null => false
  t.column, "description", :text
  t.column, "created_at",  :datetime
  t.column, "updated_at",  :datetime
end

Now you can write:

create_table :people do |t|
  t.integer :account_id
  t.string  :first_name, :last_name, :null => false
  t.text    :description
  t.timestamps
end

Active Record: Foxy fixtures

The fixtures in Active Record has taken a fair amount of flak lately. One of the key points in that criticism has been the work with declaring dependencies between fixtures. Having to relate fixtures through the ids of their primary keys is no fun. That’s been addressed now and you can write fixtures like this:


  # sellers.yml
  shopify:
    name: Shopify

  # products.yml
  pimp_cup:
    seller: shopify
    name: Pimp cup

As you can see, it’s no longer necessary to declare the ids of the fixtures and instead of using seller_id to refer to the relationship, you just use seller and the name of the fixture.

Active Record: XML in, JSON out

Active Record has supported serialization to XML for a while. In 2.0 we’ve added deserialization too, so you can say Person.new.from_xml(“David“) and get what you’d expect. We’ve also added serialization to JSON, which supports the same syntax as XML serialization (including nested associations). Just do person.to_json and you’re ready to roll.

Active Record: Shedding some weight

To make Active Record a little leaner and meaner, we’ve removed the acts_as_XYZ features and put them into individual plugins on the Rails SVN repository. So say you’re using acts_as_list, you just need to do ./script/plugin install acts_as_list and everything will move along like nothing ever happened.

A little more drastic, we’ve also pushed all the commercial database adapters into their own gems. So Rails now only ships with adapters for MySQL, SQLite, and PostgreSQL. These are the databases that we have easy and willing access to test on. But that doesn’t mean the commercial databases are left out in the cold. Rather, they’ve now been set free to have an independent release schedule from the main Rails distribution. And that’s probably a good thing as the commercial databases tend to require a lot more exceptions and hoop jumping on a regular basis to work well.

The commercial database adapters now live in gems that all follow the same naming convention: activerecord-XYZ-adapter. So if you gem install activerecord-oracle-adapter, you’ll instantly have Oracle available as an adapter choice in all the Rails applications on that machine. You won’t have to change a single line in your applications to take use of it.

That also means it’ll be easier for new database adapters to gain traction in the Rails world. As long as you package your adapter according to the published conventions, users just have to install the gem and they’re ready to roll.

Active Record: with_scope with a dash of syntactic vinegar

ActiveRecord::Base.with_scope has gone protected to discourage people from misusing it in controllers (especially in filters). Instead, it’s now encouraged that you only use it within the model itself. That’s what it was designed for and where it logically remains a good fit. But of course, this is all about encouraging and discouraging. If you’ve weighed the pros and the cons and still want to use with_scope outside of the model, you can always call it through .send(:with_scope).

ActionWebService out, ActiveResource in

It’ll probably come as no surprise that Rails has picked a side in the SOAP vs REST debate. Unless you absolutely have to use SOAP for integration purposes, we strongly discourage you from doing so. As a naturally extension of that, we’ve pulled ActionWebService from the default bundle. It’s only a gem install actionwebservice away, but it sends an important message none the less.

At the same time, we’ve pulled the new ActiveResource framework out of beta and into the default bundle. ActiveResource is like ActiveRecord, but for resources. It follows a similar API and is configured to Just Work with Rails applications using the resource-driven approach. For example, a vanilla scaffold will be accessible by ActiveResource.

ActiveSupport

There’s not all that much new in ActiveSupport. We’ve a host of new methods like Array#rand for getting a random element from an array, Hash#except to filter down a hash from undesired keys and lots of extensions for Date. We also made testing a little nicer with assert_difference. Short of that, it’s pretty much just fixes and tweaks.

Action Mailer

This is a very modest update for Action Mailer. Besides a handful of bug fixes, we’ve added the option to register alternative template engines and assert_emails to the testing suite, which works like this:

  1. Assert number of emails delivered within a block: assert_emails 1 do post :signup, :name => ‘Jonathan’ end

Rails: The debugger is back

To tie it all together, we have a stream of improvements for Rails in general. My favorite amongst these is the return of the breakpoint in form of the debugger. It’s a real debugger too, not just an IRB dump. You can step back and forth, list your current position, and much more. It’s all coming from the gracious note of the ruby-debug gem. So you’ll have to install that for the new debugger to work.

To use the debugger, you just install the gem, put “debugger” somewhere in your application, and then start the server with—debugger or -u. When the code executes the debugger command, you’ll have it available straight in the terminal running the server. No need for script/breakpointer or anything else. You can use the debugger in your tests too.

Rails: Clean up your environment

Before Rails 2.0, config/environment.rb files every where would be clogged with all sorts of one-off configuration details. Now you can gather those elements in self-contained files and put them under config/initializers and they’ll automatically be loaded. New Rails 2.0 applications ship with two examples in form of inflections.rb (for your own pluralization rules) and mime_types.rb (for your own mime types). This should ensure that you need to keep nothing but the default in config/environment.rb.

Rails: Easier plugin order

Now that we’ve yanked out a fair amount of stuff from Rails and into plugins, you might well have other plugins that depend on this functionality. This can require that you load, say, acts_as_list before your own acts_as_extra_cool_list plugin in order for the latter to extend the former.

Before, this required that you named all your plugins in config.plugins. Major hassle when all you wanted to say was “I only care about acts_as_list being loaded before everything else”. Now you can do exactly that with config.plugins = [ :acts_as_list, :all ].

And hundreds upon hundreds of other improvements

What I’ve talked about above is but a tiny sliver of the full 2.0 package. We’ve got literally hundreds of bug fixes, tweaks, and feature enhancements crammed into Rails 2.0. All this coming off the work of tons of eager contributors working tirelessly to improve the framework in small, but important ways.

I encourage you to scourger the CHANGELOGs and learn more about all that changed.

So how do I upgrade?

If you want to move your application to Rails 2.0, you should first move it to Rails 1.2.6. That’ll include deprecation warnings for most everything we yanked out in 2.0. So if your application runs fine on 1.2.6 with no deprecation warnings, there’s a good chance that it’ll run straight up on 2.0. Of course, if you’re using, say, pagination, you’ll need to install the classic_pagination plugin. If you’re using Oracle, you’ll need to install the activerecord-oracle-adapter gem. And so on and so forth for all the extractions.

So how do I install?

To install through gems, do:

gem install rails -y

...if you’re having trouble with that (gem not found), just grab gems from our own repository in the meanwhile:

gem install rails -y --source http://gems.rubyonrails.org

To try it from an SVN tag, use (you may need to run this command twice depending on your current Rails version):

rake rails:freeze:edge TAG=rel_2-0-1

Note: It’s 2.0.1 because we found a small issue just after we pushed 2.0.0.

Posted in Releases | 250 comments

Comments

  1. Observer on 07 Dec 15:06:

    You might want to consider moving the note to the top of this blog entry.

  2. underflow_ on 07 Dec 15:07:

    Congrats !!

    (you don’t need the -y option with RubyGems 0.9.5)

    Is the activeresource-2.0.1 gem published yet ? I can’t install it.

    Thanks

  3. DHH on 07 Dec 15:11:

    It is, just haven’t propagated yet. Just use the http://gems.rubyonrails.org server to get it.

  4. Antonio Cangiano on 07 Dec 15:13:

    Congratulations David. When I announced it in my blog, most people didn’t believe it. An awesome early Christmas present this year. :)

  5. underflow_ on 07 Dec 15:14:

    ok, i can see now activeresource-2.0.1 gem in http://rubyforge.org/frs/?group_id=3507. Thanks !

  6. rabble on 07 Dec 15:15:

    Congratulations! Thanks to all the rails hackers who worked on this. You all rock.

  7. Luca Guidi on 07 Dec 15:20:

    Congratulations David, I waited for long and finally it’s out!!

  8. Hendrik on 07 Dec 15:23:

    Grats. I love you all.

  9. Samuel Cotterall on 07 Dec 15:24:

    Excellent!

    Due to circumstances beyond my control I’ve been away from Rails for a while, but today I decided to come back. I checked for updates and it just so happens to be 2.0 release day.

    Keep up the good work.

  10. DHH on 07 Dec 15:25:

    Thanks guys. Just to pre-empt any bug reports in the comments, please do post those straight to dev.rubyonrails.org. Thanks and enjoy.

  11. labria on 07 Dec 15:26:

    Hooray! Thanks, guys! You rock!

  12. kelyar on 07 Dec 15:29:

    Congratulations!

  13. Martin on 07 Dec 15:33:

    Great

  14. Juan Alvarez on 07 Dec 15:33:

    Excellent job guys. Thanks a bunch for all your hard work.

  15. Chad on 07 Dec 15:35:

    Awesome! I just started porting my site to RC2 a few days ago, and I’m just finishing things up… Excellent timing :)

  16. ratioswitch on 07 Dec 15:44:

    Nice work! I love the fact that so much effort has been placed on cleaning up and already nicely organized dev platform.

    Congrats and thanks!

  17. ArthurGeek on 07 Dec 15:51:

    More about sexy migrations:

    Before you’d write:

    create_table :people do |t| t.column, “account_id”, :integer t.column, “first_name”, :string, :null => false t.column, “last_name”, :string, :null => false t.column, “description”, :text t.column, “created_at”, :datetime t.column, “updated_at”, :datetime end

    Now you can write:

    create_table :people do |t| t.references :account t.string :first_name, :last_name, :null => false t.text :description t.timestamps end

    Or:

    create_table :people do |t| t.belongs_to :account t.string :first_name, :last_name, :null => false t.text :description t.timestamps end

    Notice we no longer needs to do t.integer foobar_id . :)

  18. CB on 07 Dec 15:53:

    Awesome work. What’s the current best guess for what it will take to run it on Ruby 1.9?

  19. Cesc on 07 Dec 15:54:

    “Does it scale?” ;)

    Thanks for the big work to all the team.

  20. Eric Mill on 07 Dec 15:55:

    Congratulations to the Rails team! I’m interested to see what effect the changes as a whole are going to have on my code practices and architecture. Only one way to find out!

  21. Yaroslav Markin on 07 Dec 16:02:

    Grats everyone! Good times.

  22. Chu Yeow on 07 Dec 16:05:

    Congrats on the solid release! I’m already rubbing my hand in anticipation of running Rails 2.0+ on Ruby 1.9. Let’s get to Ruby 1.9 compatibility next! :)

    Oh that reminds me, what would the next milestones be? I’m under the impression that rendering will be looked into, and I’m expecting that Ruby 1.9 compat will be one of the few things that the core team is planning on patching as well, right?

  23. Chu Yeow on 07 Dec 16:08:

    RE: comment 22.

    Yikes, that would be “rubbing my hands tegother”.

  24. melvins on 07 Dec 16:16:

    Congrats David.. a very good christmas gift!!!

  25. Marcel Molina on 07 Dec 16:24:

    @Chu Yeow

    A lot of exploratory work and updates have already been made for 1.9 compatibility, mostly by Jeremy Kemper. So Rails 2.0 isn’t that far off from being 1.9 ready.

  26. ArthurGeek on 07 Dec 16:24:

    Ouch! Ugly rendering for code in comments. I’ll try a new one..

    Before you’d write:

    create_table :taggings do |t|

    t.integer :tag_id, :tagger_id, :taggable_id

    t.string :tagger_type

    t.string :taggable_type, :default => ‘Photo’

    end

    Now you can write:

    create_table :taggings do |t|

    t.references :tag

    t.references :tagger, :polymorphic => true

    t.references :taggable, :polymorphic => { :default => ‘Photo’ }

    end

    And t.belongs_to is an alias for t.references

    More about that in: http://dev.rubyonrails.org/changeset/7973

  27. Matteo Alessani on 07 Dec 16:38:

    Thanks once again for your excellent work!

  28. ugo on 07 Dec 16:48:

    Session on the user-side ? WTF ?! It’s the worse idea I have ever heard.

  29. ugo on 07 Dec 16:48:

    Session on the user-side ? WTF ?! It’s the worse idea I have ever heard.

  30. rubyist on 07 Dec 16:51:

    bloated => bad RESTful => bad Rails 1.0 > Rails 2.0

    for me Rails isn’t the best Framework anymore… That’s a pity

  31. Aaron Wee on 07 Dec 16:52:

    Awesome!!! Making me more in love with Rails! _

  32. sleon on 07 Dec 16:59:

    I am sooo happy with rails 2.0.1! I am also waiting to buy the pragmatic guide!!

    Best regards to you all!!!

  33. dlxiao on 07 Dec 17:05:

    Good

  34. Mat Harvard on 07 Dec 17:09:

    Party!!! Thank you Rails Team.

  35. Jamie Conlon on 07 Dec 17:18:

    congrats, wonderful release =)

  36. Josh on 07 Dec 17:27:

    woot

  37. john on 07 Dec 17:27:

    well done guys, lots of hard work went into this, so glad it’s out!

    Excellent!

  38. Pavlo on 07 Dec 17:31:

    Great work, thank you guys!

  39. fad on 07 Dec 17:32:

    Gratulations. I think with 2.0 it’s time to create an update of the famous whoops.mov ;)

  40. Damien on 07 Dec 17:35:

    Congrats!! And good job to everyone who made it happen!

  41. Jake Rutter on 07 Dec 17:38:

    Awesome! Im looking forward to this very much so. Great Job guys.

  42. Mike on 07 Dec 17:39:

    Hi,

    Im using locomotive and when I updated to rails 2.0.1 not much happend. IT installed with no errors, but weheever I try to view my app it still uses version 1.2.6….. Whats wrong?

  43. Nicholas Wright on 07 Dec 17:43:

    YAY! Great effort guys. Much appreciated.

  44. Daniel on 07 Dec 17:43:

    Congratulations guys! I’m preparing a review for this release in Portuguese – it sounds awesome.

  45. Ryan Bergeman on 07 Dec 17:49:

    Just shy of a week under 2 years since 1.0 was officially out (2005/12/13). Congratulations to all — talk about amazing.

  46. August Lilleaas on 07 Dec 17:50:

    Bah, #rubyonrails will be flooded with upgrade questions.

    But it’s worth it!

  47. Mike on 07 Dec 17:56:

    When I change RAILS_GEM_VERSION to ‘2.0.0’ in my environment file, my app stops working

  48. Ray on 07 Dec 17:58:

    Not sure what to think about this – I can’t update!

    rails -v reports: 1.99.0

    gem update rails Updating installed gems… Bulk updating Gem source index for: http://gems.rubyforge.org Attempting remote update of rails Install required dependency activesupport? [Yn] Y Install required dependency activerecord? [Yn] Y ERROR: While executing gem … (Zlib::BufError) buffer error

  49. loµis on 07 Dec 18:00:

    GREAT !!!

  50. DHH on 07 Dec 18:03:

    Mike: The current version is actually 2.0.1. You may need to change other things as well, though. Depending on what version you’re moving up from.

  51. jana4u on 07 Dec 18:11:

    48. Ray> same problem – it seems that activerecord 2.0.1 gem is corrupted

  52. Tobi on 07 Dec 18:11:

    well done! lovin it!

  53. Vivek Sharma on 07 Dec 18:13:

    I’ve been looking forward to this release. Any ideas on when the Agile Web Development for Rails (phenomenal!) book will put out a new revision with Rails 2.0? Thanks to the core team and all the hard-working contributors!

  54. MR @ Sweden on 07 Dec 18:21:

    I’m popping the champagne! Good work guys! Mad respect to you!

  55. eveel on 07 Dec 18:27:

    Oh, cool! Good work guys!

  56. Katie on 07 Dec 18:31:

    Congratulations! Great work!

  57. poland on 07 Dec 18:37:

    thank you! time for vodka :)

  58. stephen paul suarez on 07 Dec 18:42:

    rails 2.0! too awesome.. dhh you rock!

  59. Dejan Dimic on 07 Dec 18:51:

    Thank you Rails Team.

    I go now to celebrate this on a corporate party, literally.

    I have already updated to rails 2.0.1 since last nights 2.0.0. Who can ask for something more?

  60. AkitaOnRails on 07 Dec 19:20:

    Outstanding!! I’ll present at the Rio on Rails event here in Brazil and my keynote is a full fledge Rails 2.0 presentation. I’m sure people will love the new features!! Congratulations to all the collaborators!

  61. Gurn on 07 Dec 19:21:

    Woot!

  62. Mike on 07 Dec 19:41:

    I’m on windows and I get the same error as Ray. Zlib::BufError

  63. Phil Costin on 07 Dec 19:59:

    Wow! I must have downloaded it just as it was uploaded as I couldn’t find a release announcement at 3pm GMT when I noticed the gems had been updated.

    Well done guys!

  64. Andreas on 07 Dec 20:04:

    Updated to Ruby 1.8.6 (backport from OpenSUSE 10.3 to 10.0 because of actionmailer.gem trouble) and downloaded Rails 2.0.0 this morning (on both Linux and Win2k). Great work!

    One question regarding Rails 2.0.1 compared to 2.0.0 and 1.2.6: Is there a particular reason why “rails Demo; cd Demo; ./script/server” makes the default request “http://localhost:3000/rails/info/properties” hickup on MySQL? Why is a running MySQL database “Demo_development” actually required? This surely may follow later, but with 2.0.0 (and 1.2.6—) this worked without the fuzz.

  65. Stan on 07 Dec 20:16:

    Sweet! :) Congratulations!

  66. Gabe da Silveira on 07 Dec 20:17:

    Having been running edge rails exclusively for over 6 months, this is a very welcome release, and also a fantastic one. The core team really toed the line on keeping Rails lean and focused. Here’s hoping Rails 3.0 continues the same persistence of vision.

  67. DHH on 07 Dec 20:25:

    Andreas, the fix to that which was included in 2.0.0 caused other problems, so we had to yank it and do 2.0.1. We’ll get a better fix in for the next version, though. That info screen should be visible without a database configured.

  68. Alfonso Adriasola on 07 Dec 20:32:

    Fantastic! , looking forward to all the new features.

  69. Nick Karnik on 07 Dec 20:33:

    Great work…. What is next on the roadmap?

  70. Tri on 07 Dec 20:53:

    I’m on Windows XP and got the same problem as Mike and Ray: gem update; Attempting remote update of activerecord; ERROR: While executing gem … (Zlib::BufError); buffer error

  71. David Parker on 07 Dec 21:21:

    Congrats! Christmas is definitely a bit early this year!

  72. Andreas Gehret on 07 Dec 21:32:

    Congratulations and tak, David!

  73. Archie Smuts on 07 Dec 21:37:

    Thanks a stack. Successfully installed ver 2.0.1 and changed RAILS_GEM_VERSION = ‘2.0.1’ in the environment.rb of my application, ran rake ails:update:configs but get 500 Internal Server Error after restarting Mongrel. Any advice is appreciated. Thank you…

  74. Michael on 07 Dec 21:42:

    Congratulations to everyone who worked on this!

  75. Christian Lupp on 07 Dec 22:00:

    Congratulations to David, the core team and all those people involved in getting this done!

    An early and a really big xmas present! THANKS!

  76. Brian on 07 Dec 22:08:

    As DHH stated around comment 10, bug reports go at dev.rubyonrails.org. Any other issues should be directed to the excellent community in the forums and such. Not in comments here

  77. gonzo on 07 Dec 22:10:

    Does CSRF protection work with forms that are fully cached?

  78. Fjan on 07 Dec 22:12:

    Congrats & thanks for the hard work!

    Upgrade was relatively painless for me but one thing gave me troubles that I haven’t seen mentioned before: a space is now encoded as %20 instead of + so anyone who has bookmarked a link to my site with a space in it gets a 404. (Also hardcoded urls in your app would fail, but you shouldn’t have those anyway)

    It’s relatively easy to fix by putting an appropriate gsub in the affected models but I just thought I’d mention it here so people are aware. (BTW: if you use Apache as a load balancer, the mod balancer changes + to space before passing it on so that solves it too)

  79. Vingborg on 07 Dec 22:25:

    And on Pearl Harbor day, too ;-) Was that your ominously ironic intention? I would think that Rails has made a mighty splash already. In any case, this is great news.

  80. DHH on 07 Dec 22:27:

    gonzo, no. the form has to have the key set on a per session basis.

  81. vicaya on 07 Dec 22:27:

    Sweet. Is there a simpler way to customize primary keys?

    auto-incremented primary keys is the Achilles heel of rails/ActiveRecord.

  82. cn_the_greek on 07 Dec 22:37:

    Finally!! :D Congrats David!

  83. XaXa on 07 Dec 22:44:

    @Archie Smuts

    -open the config/environment.rb - inside the structure: Rails::Initializer.run do |config| put: config.action_controller.session = { :session_key => “_myapp_session”, :secret => “write smth here with at least 30 characters” }end

  84. Daniel Fischer on 07 Dec 23:11:

    Hoozah! Great work guys!

  85. Olli on 07 Dec 23:39:

    Thanks a lot :)

  86. Anonymous on 07 Dec 23:41:

    Under Win XP Zlib::BufError with rubygem 0.9.2

    No problem with rubygem 0.9.5

    Great work guys!

  87. Diego on 07 Dec 23:45:

    If you are on windows and are getting the (Zlib::BufError) error run the following:

    gem update—system

    and then try again.

    Great job guys, once again.

  88. symbeint on 08 Dec 00:18:

    Keep up the good work!

  89. Jeff Coleman on 08 Dec 00:27:

    Thanks Diego! That fixed it.

  90. http://www.zikii.com on 08 Dec 00:34:

    祝贺,move to 2.0

  91. darkhucx on 08 Dec 01:04:

    庆祝rails更新到2.0

  92. diego on 08 Dec 01:09:

    congrats, you guys rock ;)

  93. 宋波 on 08 Dec 02:07:

    hello

  94. Jeff Carlson on 08 Dec 03:10:

    Fantastic work! Thank you so much for pushing this and making it better. The one downside to all of this hard work is it makes it harder and harder to use another language / framework to create web applications.

  95. zhongwei on 08 Dec 04:03:

    D:\Downloads>gem install activerecord-2.0.1.gem ERROR: Error installing gem activerecord-2.0.1.gem[.gem]: buffer error

  96. taiko on 08 Dec 04:36:

    great job guys! it’s really impressive for me to have the new version of the world greatest web framework.

  97. JPS on 08 Dec 04:57:

    I literally picked this evening to start learning RoR. It looks l like my timing was perfect! What a gift to learn Rails using the newest version!

    Congratulations to the entire team!

  98. Obelix on 08 Dec 05:24:

    ./script/plugin install auto_complete_field Plugin not found: [“auto_complete_field”]

    Where can I find the new plugins? Any svn repository to find these?

  99. Neil R. Zamora on 08 Dec 05:35:

    Hail Rails 2.0! Now So RESTful and sexy. I want to try it before i give a praise. Good work Rails Team and DHH.

  100. Obelix on 08 Dec 06:02:

    Never mind [#98], figured out where the plugins are:

    http://svn.rubyonrails.org/rails/plugins/

    I should have listened to the deprecated warnings before :D. It took me a couple of hours and a couple of bug fixes in acts_as_rateable etc, but my rails site is up and running.

    Awesome work guys, now to understand the new cool stuff and implement them.

  101. Siva on 08 Dec 06:11:

    Thanks for this great framework. Yewoh ( www.yewoh.com) wouldn’t have been possible without rails.

    Thank you so much !!!

  102. Senthil Nayagam on 08 Dec 06:42:

    A eagerly awaited release for us.

    we have over 15 projects, which need to be ported from Rails 1.1.x and 1.2.x

    excited to see the features which have finally made into 2.0

    atlast a 2.0 framework for building 2.0 apps.

    lot of work for other frameworks for doing a catchup

    Senthil

  103. diego on 08 Dec 06:51:

    does anyone knows if ruby 2.0 will also be released before new year?

  104. Nathan Youngman on 08 Dec 06:54:

    Thanks for all your work DHH+team… really looking forward to several of the new features. best.

  105. FrankLamontagne on 08 Dec 07:22:

    Great! I can’t wait to try it out. Thank you to everyone behind RoR. Because of this incredible piece of work that RoR is, developing web applications is one of the things I enjoy the most in my life. That’s quite something.

  106. Brennan on 08 Dec 07:37:

    It wasn’t updating for me. Gave some ZLIB related error.

    I updated RubyGems from 0.9.2 to 0.9.5 (current) and all is now well.

    Just FYI.

  107. avicenna on 08 Dec 07:39:

    congratulations! truly amazing, through and through! thanks for the kickass work!

  108. www.linuxjobworld.com on 08 Dec 08:07:

    :great => :thank you

  109. Seb on 08 Dec 08:56:

    I also would like to thank you and the core team for doing such a nice work. In four years, you and 37signals have become one of the greatest player of the web. You did with Web development what Apple did with OS, not only developing the best product but giving best practises. Rails definately changed my life. Thanks. Seb, Paris

  110. Sam Figueroa on 08 Dec 08:59:

    I would like to thank the community and core team for making this possible.

    You guys bring the fun and saneness back into web development with this wonderful framework.

    I don’t know where I’d be without you guys today.

    Keep up the very greatest work.

  111. Archie Smuts on 08 Dec 09:08:

    Xaxa. Thanks you’re a star. Ruby on Rails Rules

  112. http://www.vantrix.net on 08 Dec 09:13:

    Mike and all those associated with the project-Great job done! Keep up with your good work.

    Rails rocks…

    -Anita CM

  113. Justin Lynn on 08 Dec 10:13:

    Congratulations on another awesome release! Onward and forward to world domination _

  114. Skyblaze on 08 Dec 10:16:

    All want/need a new rails 2 official book! AWDWR now is a little outdated.

  115. Jonas on 08 Dec 10:18:

    Congrats Rails core team developers and everyone that has contributed to this release of a great web framework!

  116. luonet on 08 Dec 10:36:

    恭喜恭喜

  117. rails lover on 08 Dec 10:37:

    love rails forever

  118. SSS on 08 Dec 12:33:

    This was quite a long wait. But I think the wait was quite worth it. However just a point of concern on the scalability front. Will this scale better than the earlier versions. Has any body done some bench marking. Will appreciate if any one has this data and willing to share.

  119. Clement on 08 Dec 12:57:

    A big “bravo” to the whole Rails core team for this amazing work offered to the community !

  120. ttaranto on 08 Dec 13:11:

    Very nice! hacker.com.br will reborn in Rails 2.0

  121. John Joyce on 08 Dec 13:29:

    First, Congratulations! You’ve really set the bar higher once again, for software that is opinionated, but not in hard to understand ways.

    Second, I know that you’ve got some of the absolute most humanistic API docs in the world, because I’ve read many others’ API docs that were just turn-offs. But of course, the big question remains, when will we see the books pouring out on 2.0? I saw that Obie’s book, The Rails Way, has finally hit the shelves and I guess it was delayed to include 2.0 stuff, but, it’s a bit on the too heavy to practically carry around with me side of computer books.

    Third, how does 2.0 play with Ruby 1.9? It is most definitely coming out soon and has huge changes in it that will already require some work.

    Fourth, as in my second note, there should be some effort to make sure that all the Rails tutorials out there online, that get high Google rankings, get pushed to be updated to something closer to 1.2.6 or even 2.0 This effort would do well to cut down traffic on the Rails Talk list. Just imagine how many broken experiences people are going to complain about… no use being a Vista or Leopard…

    Fifth, which brings me to OS X 10.5.x in particular, push Apple to roll out upgrades to Rails (and Ruby) within their Software Updates. This will help prevent any languishing system versions that are woefully behind. They’re getting better at being responsive to developer requests! Laurent Sonsonetti is one of the guys over there that can be a real good person to talk to.

  122. Michael on 08 Dec 13:59:

    Hey, i wish i could be happy, but i can’t.

    The ? methods on database columns stopped working.

    blah.public? returns true if the column value is “f”.

    Is this a planned behaviour? I guess this doesn’t only break my app :(

  123. Gaveen on 08 Dec 14:06:

    Thank you very much for delivering the great things we love to use.

  124. donny on 08 Dec 14:20:

    ‘rake doc:rails’ failed for me. Am I doing this all wrong in 2.0? Here is the error:

    rake aborted! Don’t know how to build task ‘vendor/rails/railties/CHANGELOG’

    (See full trace by running task with—trace)

  125. Michael on 08 Dec 14:33:

    Regarding my comment #122 the following tests:

    require File.dirname(FILE) + ’/../test_helper’

    class UserTest < Test::Unit::TestCase fixtures :users end

    def test_bool_attribues
    u = User.new(:id => 3, :login => 'blah')
    do |value| 
         u.blocked = value
         assert_equal false, u.blocked? 
       end
    do |value| 
         u.blocked = value
         assert_equal true, u.blocked?
       end
     end

    It passes in 1.2.6 but fails in 2.0.1

    I think that should not be as this features is “advertised” in the rails book.

  126. jana4u on 08 Dec 14:47:

    up-to-date rubygems (0.9.5) is required to install rails 2.0.1 on Windows XP – it would be good to add this info as another note to the end of the article

  127. lewhwa on 08 Dec 14:52:

    Wanderous!good jobs!

  128. john on 08 Dec 15:05:

    If you are getting (Zlib::BufError) buffer error, your gem installer may be out of date. E.g.,

    gem update—system

    gem install rails -y—source http://gems.rubyonrails.org

  129. Laran Evans on 08 Dec 15:15:

    Congrats! Very nice improvements indeed. Very happy to hear about extracting the commercial database plugins. I’m all in favor of getting them on their own release schedules. Should help free up some of your cycles to work on core functionality as well. That’ll be good for everyone.

  130. gino on 08 Dec 15:24:

    hi, first of all, thanx for the great update!

    After updating to rails 2.0.1 the mysql gem, I installed successfully, doesn’t seem to work…

    here’s the message when I start the server: WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

    Any comments appreciated.

  131. gino on 08 Dec 15:25:

    hi, first of all, thanx for the great update!

    After updating to rails 2.0.1 on leopard the mysql gem, I installed successfully, doesn’t seem to work…

    here’s the message when I start the server: WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

    Any comments appreciated.

  132. Gene Conroy-Jones on 08 Dec 16:28:

    Excellent work guys. I love this framework and will be looking forward to getting my hands on it next year. Getting married in December so I won’t have time before then!

    Good job!

  133. Erik Petersen on 08 Dec 17:47:

    Thanks to everyone! I’ll be looking to port my work over to 2.0 soon but I’ve hit some roadblocks:

    Release announcement gives this example:

    map.namespace(:admin) do |admin| admin.resources :products, :collection => { :inventory => :get }, :member => { :duplicate => :post }, :has_many => [ :tags, :images, :variants ] end

    however :has_many doesn’t appear in the api documentation.

    I tried rake rails:freeze:edge and got this error:

    A vendor/rails/activesupport/MIT-LICENSE A vendor/rails/activesupport/README Exported revision 8333. svn: URL ‘http://dev.rubyonrails.org/svn/rails/tags/rel_2-0-1/actionwebservice’ doesn’t exist

  134. James Rogers on 08 Dec 18:14:

    Rails is for fags.

    Real men code Fortran77

  135. Rodrigo P. on 08 Dec 20:12:

    gr8 job, i am a big RoR lover.

  136. rugal on 08 Dec 20:14:

    Great job guys!

    Just an information about migrations.

    will t.timestamps create both created_at and updated_at? And for _on ? t.datestamps? and if i want to create just one of them?

    t.datetime “created_at” ?

  137. rugal on 08 Dec 20:21:

    i forgot another thing… about the HTTP Basic Authentication. in the code example there are both username and password set on the top of the class: USER_NAME, PASSWORD = “dhh”, “secret”

    authenticate_or_request_with_http_basic do |user_name, password| user_name USER_NAME && password PASSWORD end

    and in the method you check if are equals. with a user model everything will be something like this?

    authenticate_or_request_with_http_basic do |user_name, password| user = User.find_by_nick(user_name) user && password == user.password end

    (ok, in this case the password is not encrypted, but it’s just an example :) )

    Last question, what changes with the normal authentication? is it better using this by http? why?

    thanks :)

  138. Grzegorz Derebecki on 08 Dec 20:59:

    action_controller\cgi_ext\query_extension.rb

    Method initialize_query Sets @params = {} and cgi.rb don’t have access to params. It was useful to pass via post session_id now cgi[‘key’] won’t works.

  139. max on 08 Dec 21:51:

    yes, this is better, I still think you should look into Gluon http://mdp.cti.depaul.edu for some new ideas.

  140. Maximiliano Guzman on 08 Dec 22:05:

    Thanks a lot for making programming enjoyable!!!

  141. kgodel on 08 Dec 23:10:

    David,

    You mention that the cookies are “in a hashed form that can’t be forged”.

    Why should I believe you?

    Since “forged” is a rather vague word do you mean collision resistant, pre-image resistant, or 2nd pre-image resistant?

    I haven’t glanced at all the code yet so I’ll assume your using some version of SHA-2 and are aware of the collision vulnerabilities in MD5 and (the more difficult to generate) collision vulnerabilities in SHA-1.

    Even so, “can’t be forged” sounds like snake oil, and is incontrovertibly incorrect (given enough time and enough parallel FPGAs).

  142. Alexander Muse on 09 Dec 00:28:

    WTG! Thank you so much for your contribution to software development. Our business wouldn’t exist without your efforts.

    Alexander Muse Big in Japan

  143. Mike Donaghy on 09 Dec 02:04:

    Sweet , I will upgrade as a soon as I can , can’t wait to take advantage of that new Ruby/Railsy Goodness (yes…apparently rails is also an adjective … who knew ?)

  144. RUBE on 09 Dec 02:33:

    HAVE THEY DONE ANYTHING ABOUT SLOW AS 4 SNAILS STUCK IN SALT PERFORMANCE YET? OR DID I MISS IT IN THE CHANGELOG?

  145. Dave on 09 Dec 03:20:

    Congrats & thanks! Super excited about the new features & extra Rails goodness in general :)

  146. JK (JayaKumar Pedapudi) on 09 Dec 03:49:

    Thanks to everyone! DHH’s Rails framework is very fascinating. My programming lifestyle has changed. Ruby on RAILS has now become so matured that it gives confidence to all the stakeholders.

  147. gaia on 09 Dec 03:53:

    thanx!!! i just got into Ruby and it’s great to know there is so much support around it.

  148. thekid on 09 Dec 04:28:

    I’ve tried updating rubygems, just updating rails…nothing is working. I am jumping back and forth between 404 errors and permission denied messages.

    I’m trying to upgrade from 1.2.5 to 2.01. Anyone else having problems?

  149. 8767 on 09 Dec 04:29:

    thank you for the new realease

  150. Sys Admin on 09 Dec 05:05:

    Can we get someone that knows about scaling rails over here…

    too much traffic here for RoR? Geez.

  151. sOME Guy on 09 Dec 05:27:

    hey david.. why don’t u split the entire rails package into 2 sets: 1 will be ruby scripts and other things, and 2 will be platform dependent and optimized code, can can be compiled by the user on his/her machine.

    we need a way to find the pieces that are called frequently and so, need to be optimized.

    i love rails.. but it’s slow.

  152. Paul Hoehne on 09 Dec 07:11:

    Yipppeeee!!!!

  153. Alex on 09 Dec 08:42:

    Yay ! , thanks

  154. toones.pl on 09 Dec 09:47:

    this is super! thx.

  155. KRAMMER on 09 Dec 11:59:

    Good work, thanks

  156. fkpwolf on 09 Dec 12:10:

    thinks

  157. flozano on 09 Dec 14:10:

    I have updated NetBeans 6.0 to use Rails 2.0.1, and now I can’t create new rails projects, as just one folder “RSpec” appears”... anyone knows how to solve this?

  158. Joe Alba on 09 Dec 14:17:

    Faster. Leaner. Better. How great is that?

    Thanks, all!

  159. onur gunduz on 09 Dec 14:35:

    thaaankkkk youuuuuu ^^

  160. aimee.mychores.co.uk on 09 Dec 14:54:

    Whenever i try to run the server up i get this:

    `require_frameworks’: no such file to load—openssl (RuntimeError)

    It has something to do with the initialize process and mentions something in my environment.rb file but i cannot see where i am requiring any such thing.

    What would cause this error??

  161. phil on 09 Dec 15:25:

    TOTALLY BONER! you all rock

  162. RoR sux on 09 Dec 15:46:

    Django is much better

  163. Luis Huacho on 09 Dec 17:19:

    Gracias amigos

  164. RE: RoR sux on 09 Dec 17:57:

    You suck.

    and I prefer Ruby over Python any day.

  165. noobz on 09 Dec 19:17:

    Help, I can’t run the mongrel, im using windows. After I upgrade it to 2.0 mongrel gives me an error. something about “gem_original_require”

  166. Matt on 09 Dec 20:03:

    So with the ActiveRecord serialization xml, how come its not possible to do something like:

    class Couch < ActiveRecord::Base serialize :form, Couch end

    and store an xml version of the object in the database? When I pass in a couch object, or eventually just self, it returns nil when I reference object.form.

    Cheers! Matt

  167. Uploader on 09 Dec 21:41:

    Do uploads still block?

  168. Jesper Rønn-Jensen on 09 Dec 21:54:

    WARNING:

    Zlib::BufError, and rubygems “gem update—system” on Windows.

    Please read this before updating rubygems to 0.9.5 on windows—it made my mongrel crash.

    http://justaddwater.dk/2007/12/09/rails-20-gem-install-windows-mongrel-trouble/

    Just wanted to write down some of the problems it caused me and how I solved it.

  169. Brian on 09 Dec 22:29:

    This may be a stupid question but when I just upgraded to 2.0.1 and when I run “rails newapp” I get “undefined method `camelize’ for app” error message

  170. aaaa on 09 Dec 22:43:

    gdfgdfsgdsfgdfgf

  171. Maxime on 09 Dec 23:50:

    Thanks for that great work!

  172. John S. Kim on 10 Dec 01:48:

    Great work guys! I’ve been looking forward to using this!!

  173. newbie on 10 Dec 03:47:

    rails really fun!!!

  174. Tim Dysinger on 10 Dec 04:42:

    I’ve been on “edge” for a long time waiting for this. Thank guys.

  175. dougt on 10 Dec 05:06:

    Are doubles not sexy?

    create_table :purchases do |t| ... t.double :amount ...

    undefined method `double’ for #<activerecord::connectionadapters::tabledefinition:0x25e2468>

    I believe I used to be able to say

    t.column :amount, :double

    I love the timestamps call though, DRY as it gets.

    I can’t wait to see how all the new stuff works. Great Job!

  176. Evan on 10 Dec 05:59:

    Wow! I’m very pleased to hear the good news

    thanks god, rails 2 has finally been released.

  177. Mark on 10 Dec 06:14:

    Thanks, can’t wait to dig into all these new features!

  178. Dengue on 10 Dec 06:28:

    Why does the rubyonrails.org and weblog.rubyonrails.org initial pages take so long to load? Both clocked in around 76 seconds as reported by the YSlow firefox plugin( and me watching the spinner in firefox go round while the page was blank )?

    Oddly, once past either of those pages, things are much quicker( relatively. I am still getting average page loads around 6-10 seconds ).

  179. Bala Paranj on 10 Dec 07:43:

    How to implement Active Resource on the server side?

  180. Rails > Django on 10 Dec 07:48:

    and Ruby owns, Python sucks

  181. Philippe Creux on 10 Dec 08:43:

    Great news – you rock! Hope to see it running on Ruby 1.9 for christmas :-)

  182. rainer on 10 Dec 10:03:

    Sorry, of topic,

    but I am looking for an Web Content Management System based on Rails. It seems that radiant (http://radiantcms.org/) is the best choice at the moment.

    Do you have a quick tip about some CMS you are probably using?

    (The site going to be managed is about 50 pages. The wiki entry http://wiki.rubyonrails.org/rails/pages/Ruby+on+Rails+based+CMS was not that helpful to me, ‘cause it mixes up php/rails cms and I am looking for a more specific hint.)

    Thanks to all!

  183. caker on 10 Dec 10:07:

    good job guys! newbie on rials, it’s really cool! like it!

  184. megaman on 10 Dec 11:59:

    Super! Great Work there :-)))

  185. German on 10 Dec 13:21:

    @ugo: [on 07 Dec 16:48: Session on the user-side ? WTF ?! It’s the worse idea I have ever heard.]

    How do you like cookies…?

  186. sorrowboy on 10 Dec 13:42:

    祝福_

  187. Joel on 10 Dec 14:09:

    Great job!

  188. DavidFTR on 10 Dec 15:52:

    ROR is PERFECT!!

  189. anon on 10 Dec 16:49:

    Two things to request – books on Rails 2.0 and update the presentations or screencasts on the rubyonrails site please!

  190. Anlek on 10 Dec 17:41:

    Great Job, hope to use it all soon!

  191. ABluz on 10 Dec 18:33:

    Excuse my ignoracity. Where can I find the clasic_pagination plugin? I’ve rounded up the usual suspects and none admits to knowing anything about it.

  192. Shane Vitarana on 10 Dec 19:31:

    ABluz- It is here: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination

  193. AkitaOnRails on 10 Dec 20:41:

    I invite everybody to take a look at a screencast I’ve compiled yesterday. This is the classic Blog app built using Rails 2.0. I think it is the First Rails 2.0 full featured screencast around.

    See it here

  194. Bob Yang on 11 Dec 01:32:

    I can not wait to try it! thanks the great rails team!

  195. Brilliant Wu on 11 Dec 05:21:

    Great Job~ 恭喜~ omeidedo~

  196. Seth on 11 Dec 07:06:

    I’d love to see more about the profiler…

  197. Soup on 11 Dec 08:33:

    Good job.. I will try on this new one soon..

  198. Ralf Klamma on 11 Dec 10:38:

    Since two days I get

    C:\Programme\ruby>gem update -y—source http://gems.rubyonrails.org

    Updating installed gems… Attempting remote update of activerecord ERROR: While executing gem … (Zlib::BufError)

  199. Ed on 11 Dec 12:47:

    Yeaaaaaa!!!!!!! Thanks all!!

    Likely dumb question: is this still edge? Why? It seems to me that a 2.0 release would be what it is. But then, I still don’t feel I understand the gem system totally. Can anyone explain? Thx. Ed

  200. Ben on 11 Dec 15:41:

    Great man,Great job!

  201. Kitor xy on 11 Dec 16:49:

    期待很久了,真棒。well done !!

  202. Martin Ceronio on 11 Dec 19:22:

    This is big! Hopefully my web host is going to support Rails 2.0 soon enough!

  203. Glenn Gentzke on 11 Dec 20:24:

    Migration successful! Note any of you out there using the Redhill plugins: you must be using their EDGE plugins to reap the benefits of sexy migrations. I would love to know exactly what timestamps will give you, though.

  204. тест on 11 Dec 21:17:

    на кириллицу :)

  205. Falk Pauser on 11 Dec 21:57:

    @Ralf Klamma:

    try this to update the included zlib-stuff:

    `gem update—system`

    then do `gem update` and `gem cleanup` (if you like a clean gem)

  206. Falk Pauser on 11 Dec 21:57:

    @Ralf Klamma:

    try this to update the included zlib-stuff:

    `gem update—system`

    then do `gem update` and `gem cleanup` (if you like a clean gem)

  207. Corey on 12 Dec 01:31:

    I upgraded, created a brand new rails project, started the server, surfed to localhost:3000. So far so good. Click on “About your application’s environment” and boom! The server crashes.

    dyld: NSLinkModule() error dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib Referenced from: /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle Reason: image not found

    Weak.

  208. Pablo on 12 Dec 02:37:

    Very happy with Rails 2.0. It’s a work of art.

    But how do you use the debugger with say a unit test?

    ruby my_unit_test.rb

    doesn’t seem to do it—unless there’s something seriously wrong with my test. :)

    Thanks.

  209. Pablo on 12 Dec 02:37:

    Very happy with Rails 2.0. It’s a work of art.

    But how do you use the debugger with say a unit test?

    ruby my_unit_test.rb

    doesn’t seem to do it—unless there’s something seriously wrong with my test. :)

    Thanks.

  210. Ruby Chinese Community on 12 Dec 03:03:

    glad to hear that. rails 2.0! I cannot wait to try these new features!

  211. Hate Inflector on 12 Dec 04:58:

    Action Pack: Resources: map More yucky pluralizations?

  212. 老熊 on 12 Dec 06:53:

    run my code and find:

    DEPRECATION WARNING: observer is deprecated and will be removed from Rails 2.0 See http://www.rubyonrails.org/deprecation for details. (called from D:/repos/rails_test/app/controllers/user_controller.rb:2)

    why?

  213. Ralf Klamma on 12 Dec 15:06:

    @Falk Pauser

    Worked for me.

    Thank you very much.

    Ralf

  214. AkitaOnRails on 12 Dec 16:31:

    Hello guys, after the success of the First Full Featured Screencast of Rails 2.0 I released early this week, I decided to write a Tutorial explaining the video – with a few new tidbits – in this 2 part series:

    Rolling with Rails 2.0, Part 1 and Part 2

    Enjoy!

  215. nardgo on 13 Dec 00:45:

    Hello,

    For people who are using InstantRails Package on Windows like me I’ve written an article about how to implement Rails 2.0 into your InstantRails, Click here to see it.

  216. Ruby 2.0 on 13 Dec 01:06:

    cant wait for Ruby 2.0 now :)

  217. RailsLover on 13 Dec 15:23:

    Just finished starting codes last week to find 2.0 installed on my web hosting today. Lots of tasks to clear! Anyway, thank you, DHH!

  218. J.Mihai on 13 Dec 16:41:

    With all these comments this article has become a very very very useful resource. Hopping to see more, I have learned many things from these discussions. Thanks very much for sharing.

  219. Brian K. on 13 Dec 23:59:

    Either a new book needs to be released or a documentation team needs to be assembled. Many of us cannot rely on this posting as a reference for using the new features & enhancements in v2.

  220. myaniu on 14 Dec 01:53:

    Great work! Love Rails and enjoy Rails. Thanks very much.

  221. AnySuggestions? on 14 Dec 04:31:

    C:\>rails -v c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:377:in `report_activate_error’: RubyG em version error: activerecord(1.15.3 not = 2.0.1) (Gem::LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:309:in `activate’ from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:335:in `activate’ from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `each’ from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `activate’ from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:76:in `active_gem_with_o ptions’ from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:50:in `gem’ from c:/ruby/bin/rails:18

    C:\>

  222. gissmoh on 14 Dec 12:27:

    @AnySuggestions?: gem install activerecord

  223. Hannes on 14 Dec 16:14:

    It would be very nice, if you’d update the Wiki / Screencasts section a bit. There are some major changes in version 2.0 so that most of old tutorials aren’t compatible. That’s not nice for any newbie.

    For example, I’ve checked out the linked “Build a secured web app with RoR” (http://sonjayatandon.com/05-2006/how-to-build-a-secured-web-application-with-ruby-on-rails/)—but well: doesn’t make fun to learn, if start_form_tag isn’t there anymore, f.e.

  224. Adrien Lamothe on 14 Dec 21:59:

    I updated to Rails 2.0 (on Linux) using:

    $gem update rails—include-dependencies

  225. Andrew on 15 Dec 04:02:

    ”/people/1;edit is now /people/1/edit”

    DHH – I remember you saying in a talk about resources that you put the ; syntax to discourage people from making non-crud actions. Why did you go back on it?

  226. Grzegorz Derebecki on 15 Dec 18:57:

    There is a litle bug when we use resources when controllers plural form == singular

    like: news

    see this ticked for details:

    http://dev.rubyonrails.org/ticket/10513

  227. DHH on 15 Dec 21:27:

    awesome

  228. dirk on 16 Dec 07:23:

    congrats on the new release HOWEVER:

    it sucks that old features don’t work anymore. I bought video tuts for ruby on rails on lynda, but scaffold doesnt work, so i’m stuck on section 4 and trow away my money on the video tut now :(.

  229. railsfanboy on 16 Dec 20:30:

    DHH: I love you!!!!

  230. on 17 Dec 01:06:

    WOW,i LOVE U

  231. kibblessoftware on 17 Dec 04:19:

    great job. rails in the enterprise, here we come. – JBH

  232. Jouy on 17 Dec 08:48:

    so many error on my app. I will recovert

  233. caruso_g on 17 Dec 15:39:

    When your book will be updated? I wouldn’t buy the outdated one to learn Rails. Thanks a lot.

  234. metaman on 17 Dec 22:51:

    Scaffolds kind of don’t really work anymore. Could you give us a hint on what you have in mind? Like, updating the docs or the wiki. You can generate part of the scaffold by script/generate scaffold model_name, but before you could give it the controller name as well. It creates some views, but doesn’t seem to touch the controller any more.

  235. rubyisbeautiful on 18 Dec 00:26:

    Awesome job, and a great overview of new features.

    [“If you can’t wait until the conclusion, here it is: yes. Go upgrade. In fact, I don’t have much to add to the already awesome and fairly comprehensive Rails 2.0 Overview from Ruby on Rails…”] (http://rubyisbeautiful.com/2007/12/18/time-to-upgrade-rails-2-0)

    I’m still catching up on all of the documents, but in messing with the iPhone psuedo-mime-type from the example above, I think it should be Mime::Type.register_alias

  236. jm on 18 Dec 08:33:

    Why did you choose to use the format “index.html.erb” and not “index.erb.html” Most html editors (like dreamweaver) know how to handle .html files but not erb file (unless you modify some files). It does not change a lot for me as i use textmate, but i think it makes more sense to have the mime type as the last of the extensions, and not the renderer.

  237. houserocker on 18 Dec 17:07:

    awesome!! You guys did a great job!! Thanks so much!!

  238. avocade on 20 Dec 13:37:

    Congratulations to everyone involved! I feel great being a member of this amazingly progressive community. The era of doubt about Rails is long past.

    Frohe Weinachtwünsche von Deutschland!

  239. DHH-fanboi on 20 Dec 20:50:

    I love you DHH!!!!

  240. Shmu on 22 Dec 03:09:

    Thanks for all the hard work and thought that you’v put in this version.. תודה

  241. Jules on 22 Dec 15:58:

    Wow I reinstalled Rails, and tried a quick scaffold, and wondered what was going on. Turns out that I have Rails 2.0 ! – After a bit of Googling, have some idea of the new Scaffold, and got my basic RAILS Apps up and running. Pretty daunting without a decent book on the subject. The first author to get a decent Raile 2.0 book out there will be well rewarded. Shame about your closed stance on ActiveWebService and SOAP though.

    Merry Christmas to Everyone !

    Jules

  242. Bala Paranj on 28 Dec 05:28:

    I have created a screencast that shows how to use scaffold in Rails 2.0.

    http://bparanj.blogspot.com/2007/12/rolling-with-ruby-on-rails-revised.html

    It is the cookbook app published on onlamp.com “Rolling with Ruby on Rails”.

  243. 汪亚军 on 29 Dec 05:57:

    tanks DHH

  244. Bala Paranj on 29 Dec 15:58:

    Those who want the Rails 2.0 version of the depot app in the AWDwR, get the screencast here:

    http://www.rubyplus.org/episodes/19-AWDR-Depot-App-using-Rails-2-version.html

  245. 23c on 31 Dec 16:06:

    What is your ruby version and the gem version ? I can’t run Rails 2.0.2 with ruby 1.9.0 . Thank you .

  246. David Lynch on 04 Jan 16:07:

    Bala’s screencast is probably helpful, but was also 200MB, so I didn’t actually watch it.

    Short explanation: “scaffold :model” is no longer put in the controller, it’s now an option to the generate script.

    Long explanation + example: http://davidlynch.org/blog/2008/01/rails-20-scaffolding/

  247. Zangra on 04 Jan 20:43:

    It might be awsome, great etc.. for those of you who are ahead in Rails but certainly it is a nightmare for someone like me who just started learning Rails and who is following tutorials written for older versions. I did not master generating scaffold and migration and here I learn that rhtml is no more in use, and that t.column is being replaced by t.references and much more. What I don’t like about Rails is the fact that it is not well documented. Many times I did searches about error messages that I got but in vain. I love Rails, I want to be proficient in it. Please give me advice how to progress without being frustrated for I thought the essence of Rails is to prevent programmers’ frustration in the beginning. Thank you.

  248. Wayne on 06 Jan 03:02:

    @Zangra

    You might want to use Rails 1.2.6 since, as you mention, Rails 2.0 isn’t going to be as well supported when it comes to following tutorials or doing Google searches.

    I was able to do this by entering the following via the command line (from your project directory [rails/project]):

    rake rails:freeze:edge TAG=rel_1-2-6

    That will put Rails 1.2.6 in your vendor directory and your project will use that by default.

  249. Chris on 06 Jan 04:07:

    It’s pretty unfortunate that map.resource :has_many => [], map.resource :has_one => [], and assert_difference are mentioned as neat new things but are not actually listed in the 2.0 docs.

  250. Zangra on 06 Jan 04:30:

    Thanks Wayne for your reply. I did what you said and got this error message: ERROR: Must have subversion (svn) available in the PATH to lock this application to Edge Rails. I will do some search on this issue and hope will find a solution. For the new scaffolding I think I begin to see the philosophy behind it: Instead of creating a model, a controller, views and a migration separately as in the old versions of Rails, the new scaffolding allows to do all these in one shot from the very start and I find it good (what a rewarding for the ego!). My naive vision is that Microsoft is what it is now simply because it offered tools to the common of the mortals something like the philosopher Sartre did in philosophy. Before him philosophy was a matter discussed between philosophers in closed private clubs. Sartre threw it in the street to be accessible to the layman. Same thing goes for linux. It’s no more a hassle to install it as it was in the early years. It belongs to to the layman now. A big thanks from a layman.