Rails 1.2: REST admiration, HTTP lovefest, and UTF-8 celebrations

Posted by David January 19, 2007 @ 01:06 AM

Get out your party balloons and funny hats because we’re there, baby. Yes, sire, Rails 1.2 is finally available in all it’s glory. It took a little longer than we initially anticipated to get everything lined up (and even then we had a tiny snag that bumped us straight from 1.2.0 to 1.2.1 before this announcement even had time to be written).

So hopefully it’s been worth the wait. Who am I kidding. Of course it’s been worth the wait. We got the RESTful flavor with new encouragement for resource-oriented architectures. We’re taking mime types, HTTP status codes, and multiple representations of the same resource serious. And of course there’s the international pizzazz of multibyte-safe UTF-8 wrangling.

That’s just some of the headliner features. On top of that, there’s an absolutely staggering amount of polish being dished out. The CHANGELOG for Action Pack alone contains some two hundred entries. Active Record has another 170-something on top of that.

All possible due to the amazing work of our wonderful and glorious community. People from all over the world doing their bit, however big or small, to increase the diameter of your smile. That’s love, people.

As always, you get a hold of the latest and greatest through gems:

gem install rails --include-dependencies

...or if you prefer to freeze it straight up, you can:

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

If you go with the gems, remember to change your version binding in config/environment.rb. Otherwise, you’ll still be tied to whatever old version you were using before.

Do note, though, that this is a massive upgrade. A few major components of Rails were left for scraps and entirely rewritten (routing and auto-loading included). We’ve tried our very best to remain backwards compatible. We’ve run multiple release candidate sessions to everyone help achieve that goal.

But it may not be perfect — heck, what is — so you’d be best advised to give your application a full and thorough work-out before contemplating a deployment. But of course, you’ve been such a good little tester bee that all what is needed is a single “rake” to see if everything passes, right?

How to get started learning all about Rails 1.2

With the fanfare out of the way, I point your attention to a rerun of the RC1 release notes on the new features. This rerun only contains the highlights, though. Real fans will want to peruse the CHANGELOGs themselves from the API.

For everyone else, there’s of course also the much easier path of just picking up the second edition of Agile Web Development with Rails. This edition was written to be spot on with 1.2 and contains a lot more elaborate guidance than you’ll find in the CHANGELOGs.

So it’s no wonder that the 2nd edition sold out the 15,000 copies of the first print run in a mere three weeks. Rest assured, though, the second run should already be available in stores. And for instant gratification, nothing beats picking up the PDF+Book combo off the Pragmatic book site.

REST and Resources

REST, and general HTTP appreciation, is the star of Rails 1.2. The bulk of these features were originally introduced to the general public in my RailsConf keynote on the subject. Give that a play to get into the mindset of why REST matters for Rails.

Then start thinking about how your application could become more RESTful. How you too can transform that 15-action controller into 2-3 new controllers each embracing a single resource with CRUDing love. This is where the biggest benefit is hidden: A clear approach to controller-design that’ll reduce complexity for the implementer and result in an application that behaves as a much better citizen on the general web.

To help the transition along, we have a scaffold generator that’ll create a stub CRUD interface, just like the original scaffolder, but in a RESTful manner. You can try it out with “script/generate scaffold_resource”. Left with no arguments like that, you get a brief introduction to how it works and what’ll create.

The only real API element that binds all this together is the new map.resources, which is used instead of map.connect to wire a resource-based controller for HTTP verb love. Then, once you have a resource-loving controller, you can link with our verb-emulation link link_to "Destroy", post_url(post), :method => :delete. Again, running the resource scaffolder will give you a feel for how it all works.

Formats and respond_to

While respond_to has been with us since Rails 1.1, we’ve added a small tweak in 1.2 that ends up making a big difference for immediate usefulness of the feature. That is the magic of :format. All new applications will have one additional default route: map.connect ':controller/:action/:id.:format'. With this route installed, imagine the following example:

class WeblogController < ActionController::Base
  def index
    @posts = Post.find :all
    respond_to do |format|
      format.html
      format.xml { render :xml => @posts.to_xml }
      format.rss { render :action => "feed.rxml" }
    end
  end
end
GET /weblog     # returns HTML from browser Accept header
GET /weblog.xml # returns the XML
GET /weblog.rss # returns the RSS

Using the Accept header to accomplish this is no longer necessary. That makes everything a lot easier. You can explore your API in the browser just by adding .xml to an URL. You don’t need a before_filter to look for clues of a newsreader, just use .rss. And all of them automatically works with page and action caching.

Of course, this format-goodness plays extra well together with map.resources, which automatically makes sure everything Just Works. The resource-scaffold generator even includes an example for this using format.xml, so /posts/5.xml is automatically wired up. Very nifty!

Multibyte

Unicode ahoy! While Rails has always been able to store and display unicode with no beef, it’s been a little more complicated to truncate, reverse, or get the exact length of a UTF-8 string. You needed to fool around with KCODE yourself and while plenty of people made it work, it wasn’t as plug’n’play easy as you could have hoped (or perhaps even expected).

So since Ruby won’t be multibyte-aware until this time next year, Rails 1.2 introduces ActiveSupport::Multibyte for working with Unicode strings. Call the chars method on your string to start working with characters instead of bytes.

Imagine the string ‘€2.99’. If we manipulate it at a byte-level, it’s easy to get broken dreams:

'€2.99'[0,1] # => "\342" 
'€2.99'[0,2] # => "?" 
'€2.99'[0,3] # => "€"

The € character takes three bytes. So not only can’t you easily byte-manipulate it, but String#first and TextHelper#truncate used to choke too. In the old days, this would happen:

'€2.99'.first        # => '\342'
truncate('€2.99', 2) # => '?'

With Rails 1.2, you of course get:

'€2.99'.first        # => '€'
truncate('€2.99', 2) # => '€2'

TextHelper#truncate/excerpt and String#at/from/to/first/last automatically does the .chars conversion, but if when you need to manipulate or display length yourself, be sure to call .chars. Like:

You've written <%= @post.body.chars.length %> characters.

With Rails 1.2, we’re assuming that you want to play well with unicode out the gates. The default charset for action renderings is therefore also UTF-8 (you can set another with ActionController::Base.default_charset=(encoding)). KCODE is automatically set to UTF-8 as well.

Watch the screencast. (but note that manually setting the KCODE is no longer necessary)

Unicode was in greatest demand, but Multibyte is ready handle other encodings (say, Shift-JIS) as they are implemented. Please extend Multibyte for the encodings you use.

Thanks to Manfred Stienstra, Julian Tarkhanov, Thijs van der Vossen, Jan Behrens, and (others?) for creating this library.

Routes

Action Pack has an all new implementation of Routes that’s both faster and more secure, but it’s also a little stricter. Semicolons and periods are separators, so a /download/:file route which used to match /download/history.txt doesn’t work any more. Use :requirements => { :file => /.*/ } to match the period.

Auto-loading

We’ve fixed a bug that allowed libraries from Ruby’s standard library to be auto-loaded on reference. Before, if you merely reference the Pathname constant, we’d autoload pathname.rb. No more, you’ll need to manually require 'pathname' now.

We’ve also improved the handling of module loading, which means that a reference for Accounting::Subscription will look for app/models/accounting/subscription.rb. At the same time, that means that merely referencing Subscription will not look for subscription.rb in any subdir of app/models. Only app/models/subscription.rb will be tried. If you for some reason depended on this, you can still get it back by adding app/models/accounting to config.load_paths in config/environment.rb.

Prototype

To better comply with the HTML spec, Prototype’s Ajax-based forms no longer serialize disabled form elements. Update your code if you rely on disabled field submission.

For consistency Prototype’s Element and Field methods no longer take an arbitrary number of arguments. This means you need to update your code if you use Element.toggle, Element.show, Element.hide, Field.clear, and Field.present in hand-written JavaScript (the Prototype helpers have been updated to automatically generate the correct thing).

// if you have code that looks like this
Element.show('page', 'sidebar', 'content');
// you need to replace it with code like this
['page', 'sidebar', 'content'].each(Element.show);

Action Mailer

All emails are MIME version 1.0 by default, so you’ll have to update your mailer unit tests: @expected.mime_version = '1.0'

Deprecation

Since Rails 1.0 we’ve kept a stable, backward-compatible API, so your apps can move to new releases without much work. Some of that API now feels like our freshman 15 so we’re going on a diet to trim the fat. Rails 1.2 deprecates a handful of features which now have superior alternatives or are better suited as plugins.

Deprecation isn’t a threat, it’s a promise! These features will be entirely gone in Rails 2.0. You can keep using them in 1.2, but you’ll get a wag of the finger every time: look for unsightly deprecation warnings in your test results and in your log files.

Treat your 1.0-era code to some modern style. To get started, just run your tests and tend to the warnings.

Posted in Releases | 106 comments

Comments

  1. HMS on 19 Jan 01:18:

    CONGRATS!

  2. Thiago Jackiw on 19 Jan 01:32:

    Awesome! Right on!

  3. Exempla on 19 Jan 01:36:

    Thankyou!

  4. S. Potter on 19 Jan 01:41:

    I thought it was strange when I stumbled across the 1.2.0 gem a little earlier from the gem server:) Great news and thanks!

  5. Per on 19 Jan 01:45:

    Hurra! I got a little worried when I checked out the pre-release branch and got loads of syntax errors. That’s fixed now though. Last minute panic? :)

  6. Andrew Stone on 19 Jan 01:54:

    Thank you for continuing to improve on a fantastic framework.

    One little thing, is there a resource that lists all the deprecated features?

    Thanks again!

  7. Peter Cooper on 19 Jan 02:03:

    One thing I’ve noticed.. if you’re running certain builds of Mongrel, you’ll always get an error on /script/server .. but using mongrel_rails works just fine. Alternatively, use the latest proper build of Mongrel (I was using some development build called ‘1.0’ for some reason).

  8. Jesper Rønn-Jensen on 19 Jan 02:04:

    Congratulations guys! Great to see it’s finally out!

  9. Steven A Bristol on 19 Jan 02:14:

    Congratulations!! Excellent work.

  10. Christophe on 19 Jan 02:18:

    I was waiting for it to starting develop my new website :-)

    Congratz everyone !

  11. Rockon on 19 Jan 02:19:

    Awesome!

    Might help the announcement if this post was tops for more than 20 minutes. Think it’s a bit more important than Prototype 1.5 docs. :-)

    Great job all!

  12. John W on 19 Jan 02:35:

    Already using it b4 the log was updated! Great stuff :)

  13. Cuper on 19 Jan 02:35:

    Can anyone confirm that rake rails:update:javascripts doesn’t do anything?

  14. Justin Chan on 19 Jan 02:35:

    Rails rocks the interweb!

  15. Fabio Akita on 19 Jan 02:39:

    We’ve being following your every improvement since the pre-RC era and we’re thrilled by this release. I’ve being doing an extensive coverage for the brazilian audience and we’ll continue support Rails here at Brazil!

  16. Ryan Allen on 19 Jan 02:45:

    YAaAaaaay!

  17. Bill Davenport on 19 Jan 03:19:

    Long awaited with baited breath. It’s really amazing how much better my grammer is now that I’m learning RoR!

  18. Jon Maddox on 19 Jan 03:50:

    Congrats guys. Great work! Here’s to a great year!

  19. HJ on 19 Jan 04:02:

    WOW! 1.2.1 already?

  20. Sam Danielson on 19 Jan 04:04:

    Thanks for the hard work guys! I think this is a great framework and I’m glad to see it continue to improve.

  21. Maykel Rodriguez on 19 Jan 04:26:

    Great work guys! CONGRATS!

    We at www.speedyrails.com are right now working to upgrade our servers to Rails 1.2 :)

  22. Luis de la Rosa on 19 Jan 04:37:

    Sweet – there’s nothing like the smell of freshly released software. Congrats on the release and here’s to a great 2007 with Rails!

  23. Al Brown on 19 Jan 05:43:

    Thanks, guys!

  24. bronzeiii@yahoo.com on 19 Jan 06:14:

    after i upgraded to Rails 1.2.1, my application doesn’t run anymore. i viewed the log, and it seems that the AccountController cannot be found. But it’s there… please help me!!!

    here is the log: Expected ./script/../config/../app/controllers/account_controller.rb to define AccountController

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:250:in `load_missing_constant’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:453:in `const_missing’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:465:in `const_missing’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/inflector.rb:251:in `constantize’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/core_ext/string/inflections.rb:148:in `constantize’

    D:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/routing.rb:1258:in `recognize’

    D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:40:in `dispatch’

    D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:113:in `handle_dispatch’

    D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:79:in `service’

    D:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’

    D:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start’

    D:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start’

    D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:63:in `dispatch’

    D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/servers/webrick.rb:59

    D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’

    D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require’

    D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/server.rb:39

    D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’

    D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in’

    D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require’

    ./script/server:3

    -e:4:in `load’

    -e:4

  25. Jens Tinfors on 19 Jan 06:27:

    Most excellent! Great Job!

  26. cyong on 19 Jan 07:03:

    Congratulations! Hope rails goes well…

  27. bimbomix1 on 19 Jan 07:50:

    Congratulations!! Thanks!

  28. dejan.dimic@gmail.com on 19 Jan 08:28:

    Congratulations!!! We ware passionately waiting this new release. Thank you for feeding our enthusiasm with excellent ideas.

  29. Jun-Dai on 19 Jan 08:40:

    I’ve been very much waiting for this moment. Nice work! Now we just need Ruby to come out with 2.0 and built-in Unicode support, though this certainly helps mitigate that one of the few but oft-commented shortcomings of Ruby.

  30. Morgan Roderick on 19 Jan 09:08:

    MMM … so many useful new features …

    A big thank you to the community for getting this out the door.

  31. A-Lafi on 19 Jan 09:29:

    long awaited ! ,Thanks People

  32. cover on 19 Jan 09:53:

    you’re the best, i love you, and i love rails!! :)

  33. Matthijs Langenberg on 19 Jan 10:10:

    Nice release! Keep up the good work!

  34. Daniel Fischer on 19 Jan 10:11:

    Awesome, a new toy to play with. Thanks :)

  35. Tekin on 19 Jan 10:15:

    Hurrah!

  36. Thijs van der Vossen on 19 Jan 10:47:

    Excellent. We’re really enjoying our party balloons and funny hats today.

  37. Eric Wahlforss on 19 Jan 10:55:

    Fantastic!

  38. rany keddo on 19 Jan 12:10:

    Yuhuu! Great job. Smile diameter :))

  39. Maik Kempe on 19 Jan 12:27:

    Thanks to David,the core team and all the other people for RoR.

  40. dharana on 19 Jan 12:35:

    And what will happen to:

    http://dev.rubyonrails.org/report/29

    ?

    Congratulations for the release!

  41. John on 19 Jan 12:54:

    Hm. I’ve updated 3 machines so far, all OS X (10.4.8), with Rails installed originally via the Hivelogic instructions and all three have displayed these errors while updating. Has noone else seen these errors?? Successfully installed rails-1.2.1 Successfully installed activesupport-1.4.0 Successfully installed activerecord-1.15.1 Successfully installed actionpack-1.13.1 Successfully installed actionmailer-1.3.1 Successfully installed actionwebservice-1.2.1 Installing ri documentation for activesupport-1.4.0…

    sudo gem install rails --include-dependencies

    lib/active_support/dependencies.rb:52:16: Unrecognized directive ‘nodoc’ Installing ri documentation for activerecord-1.15.1… Installing ri documentation for actionpack-1.13.1…

    lib/action_controller/routing.rb:1050:30: ’:’ not followed by identified or operator

    lib/action_controller/routing.rb:1054:39: ’:’ not followed by identified or operator Installing ri documentation for actionmailer-1.3.1… Installing ri documentation for actionwebservice-1.2.1… Installing RDoc documentation for activesupport-1.4.0…

    lib/active_support/dependencies.rb:52:16: Unrecognized directive ‘nodoc’ Installing RDoc documentation for activerecord-1.15.1… Installing RDoc documentation for actionpack-1.13.1…

    lib/action_controller/routing.rb:1050:30: ’:’ not followed by identified or operator

    lib/action_controller/routing.rb:1054:39: ’:’ not followed by identified or operator Installing RDoc documentation for actionmailer-1.3.1… Installing RDoc documentation for actionwebservice-1.2.1…

  42. Tomasz Czubinski on 19 Jan 13:18:

    Congratulations for the release !! Excellent work.

    Thanks again, again, again, ....

  43. Eric on 19 Jan 13:29:

    Hi, & thanks to DHH and the whole community for this wonderful release!

    Sorry, I didn’t take time to discover how to report bugs, so I’ll do it here:

    the default fixture yml file contains :one & :two objects, while test/functional/*_controller_test.rb created by generate/scaffold looks for :first object.

    Bye, Eric

  44. Christophe on 19 Jan 13:30:

    Thanks for this release, it’s great work.

    I just notice an small issue as I was trying to use the new scaffold_resource. I have not been working on rails for a long time, I did not find where to write a bugs report.

    I tried to use it to generate a controller in a specific directory (ex: admin/name_of_my_controller)

    Then there is an issue,and the generator cannot achieve its work

    Please let me know where I can summit this.

  45. Paul on 19 Jan 14:12:

    Many thanks! It’s so weird… This morning, I’ve had the feeling that something brilliant happened and it did! Hurray!

  46. Steve Richert on 19 Jan 14:28:

    Tremendous. Nice work on the UTF-8 handline. Keep up the good work.

  47. Steve Richert on 19 Jan 14:30:

    Tremendous. Nice work on the UTF-8 handline. Keep up the good work.

  48. Rahsun McAfee on 19 Jan 14:45:

    GREAT JOB! Thanks for the newest release! Can’t wait to put it to work!

  49. Phil on 19 Jan 15:21:

    Nice one guys. A very nice release!

  50. Jake Good on 19 Jan 15:23:

    Congratulations and great job guys! Thanks to you I have a nice, fun career ;)

  51. Ronald de Gunst on 19 Jan 15:34:

    Thanks to every contributor!

    Lets start showing the beauty of REST to the enterprisey world.

  52. Mark Carey on 19 Jan 15:34:

    @John – I’ve gotten the same ri/rdoc install errors

    However, it appears that everything else is in working order.

  53. Patrick Crowley on 19 Jan 15:41:

    Congratulations, guys!

  54. Manfred Stienstra on 19 Jan 15:55:

    Thanks to everyone for this great release, and a special thanks to David for linking our AS:Multibyte screencast (:

  55. Craig on 19 Jan 16:10:

    Awesome work! Thanks again

  56. Eric Mill on 19 Jan 16:14:

    This is awesome. I’m really impressed with the new REST/routing system. You’re really influencing how developers think about their software systems, and I think it’s a huge benefit to the web software development community. Thanks, and congratulations on the release!

  57. donald on 19 Jan 16:19:

    Very good, but one question – from where can I download the gems which comprise rails-1.2.1? I need to save the .gem files locally for posterity.

  58. Alistair Holt on 19 Jan 16:19:

    Mmmmm… Rails 1.2! :D

  59. martin on 19 Jan 16:21:

    Wonderful

  60. James on 19 Jan 16:29:

    Excellent work!

  61. Enrique Delgado on 19 Jan 16:29:

    This is awesome. Thanks!

  62. Tommaso on 19 Jan 17:12:

    Una pizza 4 stagioni, grazie

  63. Nathan on 19 Jan 17:27:

    Wow, thats a lot of “loves” in one post! Reminds me of the Bush quote…”too many Rails 1.2 developers can’t practice there love with REST and HTTP across the nation”

    http://youtube.com/watch?v=i0S3×75B1uM

  64. picolobo on 19 Jan 17:34:

    Replying “40. John on 19 Jan 12:54:”

    Hi John, I am newbie with rails, i also displayed your errors. I have uninstalled rails and dependencies gems.

    I have install “ri” (Ruby Interactive Reference) and “rdoc” (Documentation from Ruby source files) with apt (debian rules), and after i got a clean installation:

    root@ficus:~$ gem install rails—include-dependencies Successfully installed rails-1.2.1 Successfully installed rake-0.7.1 Successfully installed activesupport-1.4.0 Successfully installed activerecord-1.15.1 Successfully installed actionpack-1.13.1 Successfully installed actionmailer-1.3.1 Successfully installed actionwebservice-1.2.1 Installing ri documentation for rake-0.7.1… Installing ri documentation for activesupport-1.4.0… Installing ri documentation for activerecord-1.15.1… Installing ri documentation for actionpack-1.13.1… Installing ri documentation for actionmailer-1.3.1… Installing ri documentation for actionwebservice-1.2.1… Installing RDoc documentation for rake-0.7.1… Installing RDoc documentation for activesupport-1.4.0… Installing RDoc documentation for activerecord-1.15.1… Installing RDoc documentation for actionpack-1.13.1… Installing RDoc documentation for actionmailer-1.3.1… Installing RDoc documentation for actionwebservice-1.2.1…

    Surely it’s not necesary to uninstall and install again. Maybe with “gem rdoc gemname” the problem would be resolved. I don’t know.

    Thanks to all the rails comunity. I am learning a lot.

    saluten, picolobo

  65. John on 19 Jan 18:00:

    On one system I did try uninstalling Rails

    gem uninstall rails

    And even uninstalled each gem individually. Even went so far as removing all traces of the gems and docs and even the source_cache file.

    Still got the errors when reinstalling.

  66. Dr J on 19 Jan 18:10:

    Exellent job. Glad to finally see 1.2 get pushed out the door.

  67. Hunter on 19 Jan 18:23:

    Despite the backwards compatibility, make sure you test your apps first (duh) and make sure you can roll-back any changes.

  68. Jason on 19 Jan 18:38:

    It seems that Rails Engines Plugin has problem with Rails 1.2.1. The way to fix it is to put it the following codes in the environment.rb file.

    module Engines CONFIG = {:edge => true} end

    This will fix the error posted by bronzeiii@yahoo.com. However, i’m not sure why we needed this since this is a fix for Edge rails, but rails 1.2.1 release is an office release … isnt it???

  69. jp on 19 Jan 18:54:

    yay

  70. trevor on 19 Jan 19:34:

    finally available in all it’s glory—> finally available in all its glory

  71. Alex on 19 Jan 21:17:

    Rails 1.2 is really very nice!

    Congratulations for all rails developers.

  72. stoor on 19 Jan 22:16:

    woepeeh!!!

  73. Frank on 19 Jan 22:53:

    There’s a regression since 1.1 with in_place_editor.

    in_place_editor “xxx”, :url => ‘http://example.com/xxx?a=1&b=2&c=3’

    doesn’t work because when the xxx action is called, in “params” we get “a=1” then “amp;b=2” then “amp;c=3”.

    The code created by in_place_editor changes “&” to ”&” in javascript. It should be escaped in an HTML context, not in javascript.

    The same bug also affects :load_text_url

  74. Adam on 20 Jan 00:53:

    Replying “40. John on 19 Jan 12:54”

    John, It looks like the latest version of Rails “works best with” Ruby 1.8.5. The Hivelogic instructions install 1.8.4.

    I’ve got MacPorts installed so all I did was do: “port install ruby” , and then reinstall rails via gem.

    YMMV,

  75. I love Rails but hate Instiki on 20 Jan 02:30:

    Great news!

    Now PLEASE add some spam protection to the currently completly useless and embarrassing to the whole Rails community WIKI. Or just take it offline.

  76. Alex Levchuk on 20 Jan 02:56:

    Cool! We’ll upgrade ASAP.

  77. Pocola on 20 Jan 03:44:

    Great job guys!

  78. Anil on 20 Jan 04:56:

    Congratulations! Awesome work! Thanks!

  79. Jayme Edwards on 20 Jan 06:23:

    Congrats, and thank you!

  80. Andrew Woodward on 20 Jan 08:51:

    Congratulations!

    I’m really getting hooked on this Rails development :)

  81. John on 20 Jan 08:58:

    @Adam,

    I tried regenerating just the rdocs for ActionPack and this is what I get:

    Installing ri documentation for actionpack-1.13.1…

    lib/action_controller/routing.rb:1050:30: ’:’ not followed by identified or operator

    lib/action_controller/routing.rb:1054:39: ’:’ not followed by identified or operator Installing RDoc documentation for actionpack-1.13.1…

    lib/action_controller/routing.rb:1050:30: ’:’ not followed by identified or operator

    lib/action_controller/routing.rb:1054:39: ’:’ not followed by identified or operator

    Looking at lines 1050 and 1054 of the routing.rb file referenced shows:

    1049: def url_helper_name(name, kind = :url) 1050: :”#{name}_#{kind}” 1051: end

    1054 is similar. So that colon is what is confusing the gem rdoc command

    But this error for the docs for ActiveSupport doesn’t make sense. Line 52 is does not have ‘nodoc’ on it:

    Installing RDoc documentation for activesupport-1.4.0…

    lib/active_support/dependencies.rb:52:16: Unrecognized directive ‘nodoc’

    Hopefully this and the problem with having the latest version of rubygems (the deprecation warning when trying to do pretty much anything) will get fixed soon.

  82. Lakshan on 20 Jan 11:10:

    Thanks guys. This is great! I love the introduction of REST

  83. grrr on 20 Jan 14:45:

    I looked at the keynote and as david explains how to model crud by making explicit the relationship (for example the membership relationship) is the reinvention of the relational model nothing more and not that smart at all.

  84. grrr on 20 Jan 14:50:

    p.s. he is in-fact explaining why a relational model is better than a hierarchical model.

  85. Scott Meade on 20 Jan 17:09:

    Good work guys! Thanks!

  86. Thomas Solar on 20 Jan 17:14:

    thx very much. kepp the great work up thx

  87. Mike Cowden on 20 Jan 18:32:

    I enjoyed the keynote speech on RAILS and REST. I certainly had the same reservations every time I found myself adding a method “save_favorite” to my controller.

    For me the red-flag is any time I could easily add a method to two different controllers—it’s time to think of a new controller / model.

    Not having upgraded to 1.2 yet, one thing concerns me:

    The comment about having a directory clients/37signals—and what if they change their name to 38 signals, so we should just use the id clients/120

    This is one of those cases where I think the “real world” needs to be taken into consideration. Companies don’t change their name lightly, nor do people for that matter. The business ramifications for doing so far outweigh any development work that would result from such a change.

    For REST / WebServices this may make sense, but a human will still want to go to clients/37signals…

    This was the joy of routing and pretty urls and I hope it’s not going away in 1.2.

    The URL line itself is a user interface, just like a command line. Being able to say http://website/user/johndoe to pull up a persons profile or http://website/partners/37signals to pull up a partner page is pretty important.

    Agile Web Development 2 is still in the mail, so perhaps my fears will be allayed sense after a quick read.

  88. Aim0s on 21 Jan 00:08:

    @Mike: As a funny note: even this blog uses ‘slugs’ rather than IDs as you might see currently in the adress bar.

  89. YodaYid on 21 Jan 00:42:

    Congratulations! Great work :-)

  90. dreams2text@gmail.com on 21 Jan 05:42:

    Congrats, and thanks a lot!!!

  91. passer by on 21 Jan 06:05:

    Thanx for the wonderful!

  92. Keng Onn on 21 Jan 13:53:

    Yeah man! Congrats and thanks for all the hard work and effort u guys put in!! :D

    Btw, regarding the “’:’ not followed by identified or operator” ri/rdoc errors, I also had them. But after uninstalling Ruby 1.8.4 (I was using the one-click installer), and installing 1.8.5-21, the errors disappeared. :)

  93. Daniel on 21 Jan 14:27:

    And once again, it is one of the best things that happened to webdevelopment in the last 10 years :) So, thanks a lot for the great work!

  94. jr on 21 Jan 18:40:

    Great stuff! Update worked without any problems. Just did a jump from 1.6.1 to 1.2.1 . Thanks for all the improvements – especially for you effort to UTF8!

  95. Paul on 24 Jan 20:16:

    Amazing work and a big giant hug to all of you wonderful people who changed the world!

    Thanks for making all the other technology camps stand up and take notice (Java/.NET).

  96. Lesly on 25 Jan 20:15:

    Why the weird URL’s for REST? Where can I find some background information about it? (I mean: who has chosen it and why? what were the other possibilities?)

    My first idea was:

    GET /people (plural!!!... same as the old list or index)

    GET /person (new) POST /person (create)

    GET /person/1 (show) GET /person/1;edit (edit… i like the ’;’ syntax) PUT /person/1 (update)

    DELETE /person/1 (destroy)

    Any idea when browsers will support PUT and DELETE?

    Thanks!!! Any feedback is appreciated… I’m not new to Rails but I’m new to the REST approach… it looks very interesting although the URL’s aren’t that pretty (yes… I’m aware of the synonyms for PUT/DELETE)

    Bye Lesly

  97. Maxime GUILBOT on 26 Jan 02:54:

    Awesome! Bravo!

  98. damian on 28 Jan 17:23:

    I would know if its awesome cos the download link does not work

  99. damian on 28 Jan 19:23:

    Excellent its working now.

  100. brb on 29 Jan 21:47:

    some master needs to add a 1.2 screencast please.

  101. wayward on 02 Feb 06:12:

    A big smile and a community hug to all the Rails developers seems to be in place!

  102. Roberto Gonzalez on 06 Feb 01:48:

    Me agrada la evolución del lenguaje, y la búsqueda de la simplicidad. Yo también soy fan de los CRUDs pero no había abstraido tanto como para llevarlo a protocolo, en vez de simples action.

  103. shawn on 12 Feb 20:44:

    It is “cool” how scaffold generates deprecated code now.

  104. j4s0n on 14 Feb 04:58:

    Shweet! Let me see if my projects break.

  105. blake on 14 Feb 16:31:

    Why do model methods disappear (get method missing errors) after the first page request? The first request is fine, but refreshing results in a method missing error? Restart webrick, and start over, 1st page is fine, subsequent refreshes throw the error?

    Rails 1.2 Windows 2000

  106. axel on 14 Feb 18:56:

    Great Work!!! If you came to Cologne – you get much of Kölsch(beer of Cologne) from me!

    Thank you very much for the best Webframework in the world!

    Adios

    Axel