Rails 3.0: Second beta release

Posted by David April 01, 2010 @ 09:51 PM

It took longer than we thought, but then again, what doesn’t? This is the second beta release of Rails 3.0 and hopefully our last stop before a release candidate. There are still a handful of known regressions (see the list at the end), but we’ve made huge strides since the last release and so have auxiliary tools like Bundler.

You can find all the detailed changes in the the CHANGELOGs for each framework: Action Mailer, Action Pack, Active Record, Active Resource, Active Model, Active Support, Rails.

Please install beta 2 and try it out with new and existing applications. (gem install rails --prerelease after you make sure you’re on Ruby Gems 1.3.6 with gem update --system).

You can use Jeremy McAnally’s excellent rails_upgrade plugin to take a 2.3.x app to 3.0 (and get his update book too). There are already a good number of Rails 3 applications live in the wild.

Thanks a million to everyone who’s been working on this. Rails 3 is a mighty big barn and it’s been a joy seeing the community come together to raise it.

Note that Ruby 1.8.7 p248 and p249 has marshaling bugs that crash both Rails 2.3.x and Rails 3.0.0. Ruby 1.9.1 outright segfaults on Rails 3.0.0, so if you want to use Rails 3 with 1.9.x, jump on 1.9.2 trunk for smooth sailing.

Known regressions: Rails crashes unless configuration.action_controller.session is set, config.thread_safe does not work, Unable to run a RJS partial from an HTML template, Backtrace silencers oftem remove application lines from test failures backtraces, Active Record double escapes error_messages_for

Posted in Releases | 45 comments

Comments

  1. Sam Millar on 01 Apr 21:56:

    Finally I can display 404 pages properly. :)

  2. Alasdair Hughes on 01 Apr 21:58:

    Thanks for the update David. Can’t wait to try it out!

  3. Myles C on 01 Apr 22:01:

    Nice work, guys. with Bundler doing its work, this was just too easy.

  4. A. Sancio on 01 Apr 22:06:

    Good job guys!

  5. Daniel on 01 Apr 22:10:

    sweet. Still getting deprecation errors though.

    DEPRECATION WARNING: save(false) is deprecated, please give save(:validate => false) instead. (called from save_with_dirty at …gems/ruby-1.9.1-p378/gems/activerecord-3.0.0.beta/lib/active_record/attribute_methods/dirty.rb:19)

  6. Samer Abukhait on 01 Apr 22:11:

    Perfect timing!

  7. Naveen on 01 Apr 22:13:

    Excited to try it NOW :)

    Thanks guys

  8. Hussein Morsy on 01 Apr 22:14:

    Wow . 844 commits between the first and the second beta. Thanks for the uge work.

  9. Mirko Froehlich on 01 Apr 22:24:

    Sweet! I was expecting an April Fool’s joke, but I guess this is legit. :)

  10. Norman Clarke on 01 Apr 22:26:

    Any timeframe on getting compatibility with 1.9.1 back? I realize we’re not all on 1.9 yet, and that this is still a beta. But isn’t lack of compatibility with the current stable Ruby sort of a showstopper? I’m surprised you would even release a beta with a bug like that.

    Anyway, thanks for all the hard work. I’m glad to see you guys are in the home stretch.

  11. Zach on 01 Apr 22:55:

    I read somewhere that the tentative release date for Rails was Q1 2010, and I heard sometime in June from another source. Would it be possible to give some sort of estimate?

  12. Jeremy McAnally on 01 Apr 22:56:

    Thanks for the mention guys! This release is huge, and I’m looking forward to seeing where it goes.

    I currently have 1 Rails 3 app deployed and 3 in progress (and co-workers at Intridea have even more), so we’re very excited to see it progressing!

  13. DHH on 01 Apr 23:52:

    Zach, there’s no firm release. But it’ll be over my dead toe that we don’t make it out in final form by RailsConf Baltimore.

  14. Jarrod on 02 Apr 03:06:

    New errors after a clean install:

    /Users/Jarrod/.rvm/gems/ruby-1.9.2-preview1/gems/tzinfo-0.3.18/lib/tzinfo/timezone.rb:108:in `rescue in get’: protected method `setup’ called for #<tzinfo::datatimezone:0x00000103026a58> (TZInfo::InvalidTimezoneIdentifier)

    Am I missing something here?

    Still good to see more progress though, and I’m looking forward to the final release.

  15. robb on 02 Apr 03:46:

    I’m having the same problem as Jared using ruby version: ruby 1.9.2dev (2009-07-18 trunk 24186) on Mac OS X 10.6.2 hmm, maybe that’s the problem. I’ll update to 10.6.3 and see if that makes any difference

  16. robb on 02 Apr 03:47:

    urgh, sorry: Jared == Jarrod

  17. remi on 02 Apr 06:18:

    I’m having the same problem as Jarrod and robb

    Ruby: ruby 1.9.2dev (2009-07-18 trunk 24186) [x86_64-linux] Rails: Rails 3.0.0.beta2

  18. Christian Lupp on 02 Apr 08:53:

    Great job … and perfect that you packed everything into this second beta release.

  19. Jim on 02 Apr 09:00:

    Thanks for the hard work guys!

  20. Lenary on 02 Apr 09:44:

    http://rails3.community-tracker.com/ is also running on a very early release of rails 3 ( it was live for the bugmash in january). I forgot about it when the call for live rails 3 apps went out.

  21. Sergey on 02 Apr 10:53:

    Same here.

    .rvm/gems/ruby-1.9.2-preview1/gems/tzinfo-0.3.18/lib/tzinfo/timezone.rb:108:in `rescue in get’: protected method `setup’ called for #<tzinfo::datatimezone:0x000000024b7cb8> (TZInfo::InvalidTimezoneIdentifier)

    ruby 1.9.2dev (2009-07-18 trunk 24186) [x86_64-linux]

  22. jblanche on 02 Apr 12:14:

    same here with ruby 1.9.2 and the tzinfo bug

  23. Nick Stewart on 02 Apr 13:45:

    Great new, thanks!

    Getting the same tzinfo error as Jarrod, Robb, remi and Sergey.

    Looks like it’s a problem with Ruby 1.9.2-preview1 http://bit.ly/bWNlDH.

  24. Terry Sznober on 02 Apr 13:50:

    I get the following error after upgrading:

    /terrysznober$ rails testapp /Users/terrysznober/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta2/lib/rails/generators.rb:6:in `require’: no such file to load—active_support/core_ext/object/singleton_class (LoadError)

  25. passenger on 02 Apr 14:29:

    Same error with Terry Sznober /Users/xxx/.rvm/gems/ruby-head/gems/railties-3.0.0.beta2/lib/rails/generators.rb:6:in `require’: no such file to load—active_support/core_ext/object/singleton_class (LoadError)

  26. passenger_again on 02 Apr 14:37:
    for the issue i mentioned before, command
    1. gem clean works for me
  27. robb on 02 Apr 16:22:

    Updated to ruby svn trunk, and now rails server will start and I can run rake tasks, which I couldn’t before.

    Thanks to TZInfo dev for pointing out the issue, mentioned by Nick S

  28. Chris on 02 Apr 16:26:

    So where’s the documentation?

  29. Jarrod on 02 Apr 16:56:

    Thanks for the info robb.

    This seems to do the trick: rvm install 1.9.2-head

  30. Nick Stewart on 02 Apr 17:01:

    @Jarrod Works for me too. Thanks Robb.

  31. linoj on 02 Apr 17:04:

    $ bundle install => * extconf.rb failed * Can’t handle 1.9.x yet (for mongodb)

    anyone know about this?

    $ ruby -v => ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin10.2.0]

  32. remi on 02 Apr 18:12:

    `rvm install 1.9.2-head` does NOT work for me! I still get a TZInfo error.

    I am on: ruby 1.9.2dev (2009-07-18 trunk 24186)

  33. remi on 02 Apr 18:15:

    I also tried JRuby: jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot™ 64-Bit Server VM 1.6.0_19) [amd64-java]

    If I try to run a Rails 3 Beta 2 application, I get:

    /home/remi/.rvm/gems/jruby-1.4.0/gems/actionpack-3.0.0.beta2/lib/action_dispatch/routing/route.rb:20:in `initialize’: wrong # of arguments(4 for 3) (ArgumentError) from /home/remi/.rvm/gems/jruby-1.4.0/gems/actionpack-3.0.0.beta2/lib/action_dispatch/routing/route_set.rb:277:in `new’ from /home/remi/.rvm/gems/jruby-1.4.0/gems/actionpack-3.0.0.beta2/lib/action_dispatch/routing/route_set.rb:277:in `add_route’

  34. remi on 02 Apr 18:19:

    Ah ha, I was still on revision 24186 of Ruby 1.9.2. I upgraded to revision 27196 and it works!

    Thanks everyone!

  35. Michael Hasenstein on 03 Apr 14:44:

    Would someone know why I get “Please install the mysql gem and try again: gem install mysql” even though I have the gem installed?

    Setup: using rvm and ruby-1.9.2-head, rails-3.0.0.beta2, and the mysql-gem clearly installed and listed in that rvm-environment)

  36. Michael Hasenstein on 03 Apr 15:20:

    To answer myself and for reference for others, one has to put the gems into the “Gemfile” in the root of the application folder.

  37. makevoid on 03 Apr 18:05:

    @terry, @passenger

    I solved the:

    no such file to load—active_support/core_ext/object/singleton_class (LoadError)

    by commenting the line number 6 in:

    GEMS/railties-3.0.0.beta2/lib/rails/generators.rb

    require ‘active_support/core_ext/object/singleton_class’

    because that file doesn’t exist anymore!

  38. Millisami on 03 Apr 19:50:

    @makevoid, Tahnks. That solved my same error which @terry and @passenger was getting.

  39. bobbie on 04 Apr 15:29:

    nice work, 1 strange one, all output from my custom error helper is rendered with “double escaped” content in forms

    module ErrorsHelper def error_messages_for(*params) . . . . . end end

    when I copy the /active_model_helper.rb error_messages_for method into a custom helper the error messages are double escaped still, producing “can’t be blank& lt;/li& gt;& lt;li& gt;”

    :-)

  40. Ian Borsan on 05 Apr 06:41:

    config/boot.rb:11:in `require’: no such file to load—bundler (LoadError)

    updated from beta1 to beta2, seems like bundler isnt being found.

  41. Joshua Partogi on 06 Apr 06:49:

    Kewl. Thanks for the update. I will try this latest update on our latest product.

  42. arom on 06 Apr 10:47:

    I try to run a Rails 3 Beta 2 application, I get:

    [2010-04-06 13:43:07] INFO WEBrick 1.3.1 [2010-04-06 13:43:07] INFO ruby 1.9.1 (2009-12-07) i686-linux INFO WEBrick::HTTPServer#start: pid=26202 port=3000 /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:445: [BUG] Segmentation fault ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]

    - control frame --—- c:0053 p: s:0294 b:0294 l:000293 d:000293 CFUNC :caller c:0052 p:0172 s:0291 b:0291 l:000290 d:000290 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:445 c:0051 p:0029 s:0278 b:0278 l:000268 d:000277 BLOCK /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:153 c:0050 p: s:0274 b:0274 l:000273 d:000273 FINISH c:0049 p: s:0272 b:0272 l:000271 d:000271 CFUNC :each c:0048 p:0076 s:0269 b:0269 l:000268 d:000268 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta2/lib/active_support/dependencies.rb:151 c:0047 p:0044 s:0262 b:0262 l:000253 d:000261 BLOCK /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta2/lib/active_support/inflector/methods.rb:112 c:0046 p: s:0259 b:0259 l:000258 d:000258 FINISH c:0045 p: s:0257 b:0257 l:000256 d:000256 CFUNC :each c:0044 p:0074 s:0254 b:0254 l:000253 d:000253 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta2/lib/active_support/inflector/methods.rb:111 c:0043 p:0067 s:0248 b:0248 l:000247 d:000247 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/routing/route_set.rb:47 c:0042 p:0049 s:0241 b:0241 l:000240 d:000240 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/routing/route_set.rb:25 c:0041 p:0095 s:0235 b:0235 l:000207 d:000234 BLOCK /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rack-mount-0.6.1/lib/rack/mount/recognition/route_set.rb:75 c:0040 p:0014 s:0229 b:0229 l:000213 d:000228 BLOCK /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rack-mount-0.6.1/lib/rack/mount/recognition/code_generation.rb:99 c:0039 p:0188 s:0224 b:0224 l:000223 d:000223 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rack-mount-0.6.1/lib/rack/mount/recognition/code_generation.rb:76 c:0038 p:0193 s:0214 b:0214 l:000213 d:000213 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rack-mount-0.6.1/lib/rack/mount/recognition/code_generation.rb:98 c:0037 p:0089 s:0208 b:0208 l:000207 d:000207 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rack-mount-0.6.1/lib/rack/mount/recognition/route_set.rb:66 c:0036 p:0024 s:0202 b:0202 l:000201 d:000201 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/routing/route_set.rb:454 c:0035 p:0013 s:0198 b:0198 l:002298 d:000197 BLOCK /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta2/lib/active_record/query_cache.rb:31 c:0034 p:0038 s:0196 b:0196 l:000195 d:000195 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta2/lib/active_record/connection_adapters/abstract/query_cache.rb: c:0033 p:0051 s:0192 b:0192 l:000191 d:000191 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta2/lib/active_record/query_cache.rb:11 c:0032 p:0019 s:0188 b:0188 l:002298 d:002298 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta2/lib/active_record/query_cache.rb:30 c:0031 p:0014 s:0184 b:0184 l:000183 d:000183 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta2/lib/active_record/connection_adapters/abstract/connection_pool c:0030 p:0090 s:0180 b:0180 l:000179 d:000179 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/middleware/head.rb:14 c:0029 p:0150 s:0173 b:0173 l:000172 d:000172 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/methodoverride.rb:24 c:0028 p:0045 s:0167 b:0167 l:000166 d:000166 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/middleware/params_parser.rb:19 c:0027 p:0051 s:0162 b:0162 l:000161 d:000161 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/middleware/flash.rb:167 c:0026 p:0086 s:0156 b:0156 l:000155 d:000155 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/middleware/session/cookie_store.rb:107 c:0025 p:0014 s:0146 b:0146 l:000145 d:000145 METHOD /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/middleware/cookies.rb:206 c:0024 p:0029 s:0137 b:0137 l:001b80 d:000136 BLOCK /opt/ruby1.9.1/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta2/lib/action_dispatch/middleware/callbacks.rb:46 Segmentation fault

    ruby—version ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux] gem list

    • LOCAL GEMS *

    abstract (1.0.0) actionmailer (3.0.0.beta2, 3.0.0.beta) actionpack (3.0.0.beta2, 3.0.0.beta) activemodel (3.0.0.beta2, 3.0.0.beta) activerecord (3.0.0.beta2, 3.0.0.beta) activeresource (3.0.0.beta2, 3.0.0.beta) activesupport (3.0.0.beta2, 3.0.0.beta, 2.3.5) arel (0.3.3, 0.2.1) builder (2.1.2) bundler (0.9.16) erubis (2.6.5) i18n (0.3.6) mail (2.1.5.3) memcache-client (1.8.2, 1.7.8) mime-types (1.16) mysql (2.8.1) polyglot (0.3.1) rack (1.1.0) rack-mount (0.6.1, 0.4.7) rack-test (0.5.3) rails (3.0.0.beta2, 3.0.0.beta) railties (3.0.0.beta2, 3.0.0.beta) rake (0.8.7) rubygems-update (1.3.6) sqlite3-ruby (1.2.5) text-format (1.0.0) text-hyphen (1.0.0) thor (0.13.4) treetop (1.4.5) tzinfo (0.3.19)

  43. peter cox on 07 Apr 05:09:

    good work!!!

    ...but slight drawback -the lack of control over the errors and the default way that all html code inside the errors is html escaped. Why o why o why did this change from rails 3beta to beta2??!!! surely errors generated from model validations simply dont need to use the erb:utils escape html !!!!

  44. Jonathan Castello on 08 Apr 09:02:

    I’m having the exact same tzinfo bug as mentioned by others. This is pretty a pretty annoying result after spending a few hours getting everything Ruby-related freshly installed with the latest versions.

  45. Great work! on 09 Apr 03:36:

    I just decided to scrap myself a new git file type database blog using rails 3 beta 2, and its going pretty well so far!