<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tommy Chheng &#187; rails 2.3.2</title>
	<atom:link href="http://tommy.chheng.com/index.php/tag/rails-2-3-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://tommy.chheng.com</link>
	<description>All Things Programming!</description>
	<lastBuildDate>Sat, 24 Jul 2010 17:34:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Ruby on Rails 2.3.2 Upgrade Gotchas</title>
		<link>http://tommy.chheng.com/index.php/2009/06/ruby-on-rails-2-3-2-upgrade-gotchas/</link>
		<comments>http://tommy.chheng.com/index.php/2009/06/ruby-on-rails-2-3-2-upgrade-gotchas/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 07:53:31 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rails 2.3.2]]></category>

		<guid isPermaLink="false">http://tommy.chheng.com/?p=115</guid>
		<description><![CDATA[While cleaning/re-factoring the PeopleJar codebase, we decided to make the move from Rails 2.2.2 to Rails 2.3.2. Rack integration was the biggest single &#8220;under the hood&#8221; change. Adam Wiggins of Heroku explains the benefits in his Rails Metal, Rack and Sinatra presentation from RailsConf. He has a great example of incorporating a Sinatra app with [...]]]></description>
			<content:encoded><![CDATA[<p>While cleaning/re-factoring the <a href="http://peoplejar.com">PeopleJar</a> codebase, we decided to make the move from Rails 2.2.2 to Rails 2.3.2. Rack integration was the biggest single &#8220;under the hood&#8221; change.  Adam Wiggins of Heroku explains the benefits in his <a href="http://adam.blog.heroku.com/past/2009/5/6/railsconf_slides_rails_metal_rack_sinatra/">Rails Metal, Rack and Sinatra presentation from RailsConf</a>.  He has a great example of incorporating a Sinatra app with a Rails app.</p>
<p>No upgrades would be complete without some incompatibilities. As noted on the <a href="http://guides.rubyonrails.org/2_3_release_notes.html">official Ruby on Rails release notes</a>, test Sessions, Cookies, File uploads, JSON/XML APIs. We found conflicts in the facebooker and ar-extensions gems. Luckily, the developers already pushed out fixes so you can just do a gem update.</p>
<p>There was one other cryptic error in one of our ajax calls:</p>
<pre>  Status: 500 Internal Server Error
  private method `split' called for #
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/mime_type.rb:206:in `method_missing'
    /opt/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:51:in `media_type'
    /opt/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:117:in `parseable_data?'
    /opt/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:138:in `POST'
    /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/request.rb:428:in `request_parameters'</pre>
<p>We could fix this with some good old monkey patching! Add this to an initializer in your config/initializers directory. this is a <a href="https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2564-acrequestcontent_type-should-return-a-string">reported bug</a> at the rails lighthouse and should be fixed in the next release.</p>
<pre>module Mime
  class Type
    def split(*args)
      to_s.split(*args)
    end
  end
end</pre>
<p>Overall, the upgrade went pretty well: just a few gem upgrades and minor tweaks. If you are on Rails 2.2.2 or older, give the upgrade a shot! </p>
]]></content:encoded>
			<wfw:commentRss>http://tommy.chheng.com/index.php/2009/06/ruby-on-rails-2-3-2-upgrade-gotchas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
