Rails 3 Upgrade

1,522 views

Published on

Lightning talk for American Express Publishing Online Team for August 5, 2011. Discusses some major and minor points we would have to watch out for when we eventually move our front-end applications to Rails 3.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,522
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rails 3 Upgrade

  1. 1. Getting Ready to Ride Rails 3.0<br />
  2. 2. Comprehensive Tests<br />Do code coverage. When you start changing things your failed tests will point the way.<br />
  3. 3. Ruby 1.8.7 or 1.9.2<br />No, not 1.8.6 and definitely not 1.9.1 even though it might trick you at first glance. Don’t do it!!!<br />
  4. 4. Have fun wrestling with Bundler!<br />Bundler is the new way to manage gem dependencies.<br />
  5. 5. Rails 3 is JavaScript Agnostic<br />Start converting JavaScript now.<br />
  6. 6. Rails Metal Has Been Removed<br />Noticed partner feeds in FWR includes metal, will need to be transitioned…<br />
  7. 7. Removing Metal from Rails 3. <br />if your metal behaves like a middleware, add it to the middleware stack via config.middleware.use. You can use methods on the middleware stack to control exactly where it should go<br />if it behaves like a Rack endpoint, you can link to it in the router. This will result in more optimal routing time, and allows you to remove code in your endpoint that matches specific URLs in favor of the more powerful handling in the router itself. <br />For the future, you can use ActionController::Metal to get a very fast controller with the ability to opt-in to specific controller features without paying the penalty of the full controller stack.<br />Since Rails 3 is closer to Rack, the Metal abstraction is no longer needed.<br />Source: http://github.com/rails/rails/commit/ed34652d1aca148fea61c5309c1bd5ff3a55abfa<br />
  8. 8. RAILS_ROOT, RAILS_ENV, and RAILS_DEFAULT_LOGGER constants are now deprecated<br />Railties, one of the Gems part of the Rails 3 framework, now deprecates the following global constants:<br />RAILS_ROOT in favor of Rails.root<br />RAILS_ENV in favor of Rails.env<br />RAILS_DEFAULT_LOGGER in favor of Rails.logger<br />
  9. 9. Resources<br />The Road to Rails 3<br />http://www.simonecarletti.com/blog/2010/07/the-way-to-rails-3/<br />Ruby on Rails Tutorial: Learn Rails by Example<br />http://railstutorial.org/?discount=hackernews01<br />Screencast: Upgrading applications to Rails 3<br />http://thinkcode.tv/catalog/upgrading-rails-3/?utm_source=simonecarletti.com&utm_medium=link&utm_content=message-rails3upgrade&utm_campaign=rails3upgrade<br />Rails 3 Book in Digital Library<br />

×