<?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>42 &#187; rails 2.0.2</title>
	<atom:link href="http://www.42.mach7x.com/tag/rails-202/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.42.mach7x.com</link>
	<description>Thoughts and tips about programming with Ruby on Rails</description>
	<lastBuildDate>Wed, 01 Feb 2012 14:38:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Developing in Rails 2.1 and deploying in Rails 2.0.2 (or error &#8211; undefined method time_zone)</title>
		<link>http://www.42.mach7x.com/2008/07/16/developing-in-rails-21-and-deploying-in-rails-202-or-error-undefined-method-time_zone/</link>
		<comments>http://www.42.mach7x.com/2008/07/16/developing-in-rails-21-and-deploying-in-rails-202-or-error-undefined-method-time_zone/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 12:48:17 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[rails 2.0.2]]></category>
		<category><![CDATA[Rails 2.1]]></category>
		<category><![CDATA[undefined method=time zone]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=39</guid>
		<description><![CDATA[Problem You are developing on the latest version of Rails (2.1), but your production server for deployment uses version 2.0.2 (as dreamhost is using at the moment). Solution First change the environment.rb file to use the rails version in your deployment server RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION You should probably be geting the error: [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You are developing on the latest version of Rails (2.1), but your production server for deployment uses version 2.0.2 (as dreamhost is using at the moment). </p>
<p><strong>Solution</strong></p>
<ol>
<li>First change the environment.rb file to use the rails version in your deployment server
<pre class="code">RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
</pre>
</li>
<li>You should probably be geting the error: <i>undefined method = time zone </i> by now, so make sure you comment out from further down your environment.rb file the line:
<pre class="code">config.time_zone = 'UTC'</pre>
</li>
<li>Some further errors would be caused by the file config/initializers/new_rails_defaults.rb, so make sure you comment out the following lines:
<pre class="code">ActiveRecord::Base.include_root_in_json = true
ActiveRecord::Base.store_full_sti_class = true
ActiveSupport.use_standard_json_time_format = true
ActiveSupport.use_standard_json_time_format = true</pre>
</li>
</ol>
<p>You should be able to deploy and use your application now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2008/07/16/developing-in-rails-21-and-deploying-in-rails-202-or-error-undefined-method-time_zone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Rails 2.0.2 problems/solutions</title>
		<link>http://www.42.mach7x.com/2008/04/08/upgrading-to-rails-202-problemssolutions/</link>
		<comments>http://www.42.mach7x.com/2008/04/08/upgrading-to-rails-202-problemssolutions/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 09:13:16 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rails 2.0.2]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=25</guid>
		<description><![CDATA[Problem Upgrading from Rails version 1.2.3 to version 2.0.2. Following the suggestion in DH&#8217;s weblog here when using sudo gem install rails -y, it gets the trunk version of rails which at the time was 2.0.2.9216. This causes a few problems and breaks a few more things. Solution In order to get back to the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Upgrading from Rails version 1.2.3 to version 2.0.2.<br />
Following the suggestion in DH&#8217;s weblog <a href="http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done">here</a> when using sudo gem install rails -y, it gets the trunk version of rails which at the time was 2.0.2.9216.<br />
This causes a few problems and breaks a few more things.</p>
<p><strong>Solution</strong><br />
In order to get back to the latest stable version, you have to uninstall a few of the gems installed from the trunk version.<br />
If you have installed the latest version of top of an existing one using gems, then doing:</p>
<pre class="code">gem list --local</pre>
<p>will give you all the installed versions of the gems. Something like:</p>
<pre class="code">actionmailer (2.0.2.9216, 2.0.2, 1.3.3)
actionpack(2.0.2.9216, 2.0.2, 1.3.3)
rails(2.0.2.9216, 2.0.2, 1.2.3)
...</pre>
<p>Make sure you uninstall all the gems with version number 2.0.2.9216:</p>
<pre class="code">sudo gem uninstall rails
sudo gem uninstall actionmailer
sudo gem uninstall actionpack
sudo gem uninstall activerecord
sudo gem uninstall activeresource
sudo gem uninstall activesupport
sudo gem uninstall rails</pre>
<p>In each of the above commands the gem package manager should ask you to select the one you want to uninstall.<br />
Pick the one with the 2.0.2.9216 (or other version later than 2.0.2).</p>
<p>At the end if you list the gems again you should only have gems going up to version 2.0.2</p>
<p>An extra step I had to take for making the migrations work was to install rake again:</p>
<pre class="code">sudo gem install rake</pre>
<p>After all these my installation seems to be working fine again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2008/04/08/upgrading-to-rails-202-problemssolutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

