<?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>codedifferent.com &#187; ruby</title>
	<atom:link href="http://www.codedifferent.com/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codedifferent.com</link>
	<description>mobile &#124; mac &#124; business &#124; development blog</description>
	<lastBuildDate>Sun, 04 Dec 2011 17:32:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Ruby 1.9.1 &amp; Rails 3.0: Fixing &#8216;Invalid .gemspec format&#8217; and rubygem warnings</title>
		<link>http://www.codedifferent.com/2010/02/11/ruby-1-9-1-rails-3-0-fixing-invalid-gemspec-format-and-rubygem-warnings/</link>
		<comments>http://www.codedifferent.com/2010/02/11/ruby-1-9-1-rails-3-0-fixing-invalid-gemspec-format-and-rubygem-warnings/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 21:22:35 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails3.0]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby1.9.1]]></category>
		<category><![CDATA[rubygems]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[warnings]]></category>

		<guid isPermaLink="false">http://www.codedifferent.com/?p=544</guid>
		<description><![CDATA[I had a lot of trouble with some rubygem warnings after upgrading to Ruby 1.9.1 and Rails 3.0 on Mac OS x Snow Leopard. They always occurred when I started the server within the project with the command rails server At first, when running on bundler 0.9.3, I had two types of errors. The first [...]]]></description>
			<content:encoded><![CDATA[<p>I had a lot of trouble with some rubygem warnings after upgrading to Ruby 1.9.1 and Rails 3.0 on Mac OS x Snow Leopard. They always occurred when I started the server within the project with the command</p>

<div class="wp_codebox"><table><tr id="p54411"><td class="code" id="p544code11"><pre class="bash" style="font-family:monospace;">rails server</pre></td></tr></table></div>

<p>At first, when running on bundler 0.9.3,  I had two types of errors. The first NoMethodError populated the terminal with hundreds lines of code, like &#8230;</p>

<div class="wp_codebox"><table><tr id="p54412"><td class="code" id="p544code12"><pre class="bash" style="font-family:monospace;">WARNING:  <span style="color: #666666; font-style: italic;"># NoMethodError: undefined method ` ' for nil:NilClass </span>
<span style="color: #666666; font-style: italic;"># -*- encoding: utf-8 -*-</span>
...
WARNING:  Invalid .gemspec format <span style="color: #000000; font-weight: bold;">in</span> \
<span style="color: #ff0000;">'.rvm/gems/ruby-1.9.1-p378/specifications/spec.gemspec'</span></pre></td></tr></table></div>

<p>The <a href="http://github.com/carlhuda/bundler/issues/issue/24#issue/24/comment/127572">bundler-team around Carlhuda</a> fixed that issue within bundler 0.9.4. So that problem will not occur any more.<br />
The other problem was quite persistent. When starting the server via</p>

<div class="wp_codebox"><table><tr id="p54413"><td class="code" id="p544code13"><pre class="bash" style="font-family:monospace;">rails server</pre></td></tr></table></div>

<p>or doing a test via</p>

<div class="wp_codebox"><table><tr id="p54414"><td class="code" id="p544code14"><pre class="bash" style="font-family:monospace;">rake</pre></td></tr></table></div>

<p>within the rails-3-project resulted in a bunch of warnings:</p>

<div class="wp_codebox"><table><tr id="p54415"><td class="code" id="p544code15"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems.rb:<span style="color: #000000;">14</span>: \
warning: already initialized constant VERSION
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems.rb:<span style="color: #000000;">14</span>: \
warning: already initialized constant RubyGemsVersion
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems.rb:<span style="color: #000000;">194</span>: \
warning: already initialized constant MUTEX
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems.rb:<span style="color: #000000;">196</span>: \
warning: already initialized constant RubyGemsPackageVersion
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems.rb:<span style="color: #000000;">202</span>: \
warning: already initialized constant WIN_PATTERNS
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems.rb:<span style="color: #000000;">1079</span>:\
 warning: already initialized constant MARSHAL_SPEC_DIR
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems.rb:<span style="color: #000000;">1084</span>: \
warning: already initialized constant YAML_SPEC_DIR
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>version.rb:<span style="color: #000000;">72</span>: \
warning: already initialized constant VERSION_PATTERN
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>requirement.rb:<span style="color: #000000;">20</span>: \
warning: already initialized constant OPS
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>requirement.rb:<span style="color: #000000;">30</span>: \
warning: already initialized constant OP_RE
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>version.rb:<span style="color: #000000;">246</span>: \
warning: already initialized constant Requirement
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>dependency.rb:<span style="color: #000000;">18</span>: \
warning: already initialized constant TYPES
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>platform.rb:<span style="color: #000000;">171</span>: \
warning: already initialized constant RUBY
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>platform.rb:<span style="color: #000000;">177</span>: \
warning: already initialized constant CURRENT
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>specification.rb:<span style="color: #000000;">39</span>: \
warning: already initialized constant NONEXISTENT_SPECIFICATION_VERSION
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>specification.rb:<span style="color: #000000;">50</span>: \
warning: already initialized constant CURRENT_SPECIFICATION_VERSION
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>specification.rb:<span style="color: #000000;">56</span>: \
warning: already initialized constant SPECIFICATION_VERSION_HISTORY
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>specification.rb:<span style="color: #000000;">72</span>: \
warning: already initialized constant MARSHAL_FIELDS
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>specification.rb:<span style="color: #000000;">75</span>: \
warning: already initialized constant TODAY
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>source_index.rb:<span style="color: #000000;">593</span>: \
warning: already initialized constant Cache
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">14</span>: \
warning: already initialized constant DEFAULT_BACKTRACE
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">15</span>: \
warning: already initialized constant DEFAULT_BENCHMARK
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">16</span>: \
warning: already initialized constant DEFAULT_BULK_THRESHOLD
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">17</span>: \
warning: already initialized constant DEFAULT_VERBOSITY
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">18</span>: \
warning: already initialized constant DEFAULT_UPDATE_SOURCES
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">24</span>: \
warning: already initialized constant OPERATING_SYSTEM_DEFAULTS
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">30</span>: \
warning: already initialized constant PLATFORM_DEFAULTS
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span>1.9.1<span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>config_file.rb:<span style="color: #000000;">53</span>: \
warning: already initialized constant SYSTEM_WIDE_CONFIG_FILE</pre></td></tr></table></div>

<p><a href="https://rails.lighthouseapp.com/projects/8994/tickets/3865-invalid-gemspec-format-in-and-already-initialized-constant-warnings-with-ruby-192dev">Jeremy Kemper from the Rails core team</a> pointed out that this is not a Rails problem, but a RubyGems issue. Ruby 1.9 ships with an outdated RubyGems &#8230; like 1.9.1p378 ships with RubyGems 1.3.1. I did update RubyGems to Version 1.3.5 by</p>

<div class="wp_codebox"><table><tr id="p54416"><td class="code" id="p544code16"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem update <span style="color: #660033;">--system</span></pre></td></tr></table></div>

<p>but this resulted in some duplicated rubygem files, which cause the error. </p>
<p>So how can the problem be solved? Deleting and reinstalling Ruby 1.9.1 does not have any effect &#8230; but the solution is quite simple:</p>
<h3>If you already installed Ruby 1.9.1 and Rails 3.0 beta:</h3>
<p>1. Be sure that you do NOT install RubyGems 1.3.5 separately after the installation of Ruby 1.9.1 &#8211; this would result in a double installation. So have that in mind when following the excellent instructions to <a href="http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/">installing Ruby, RubyGems, and Rails on Snow Leopard of Dan Benjamin</a>.</p>
<p>2. If you already installed Ruby 1.9.1, updated to RubyGems 1.3.5 and bundler 0.9.4 and also installed Rails 3.0, the only thing you have to do is:</p>

<div class="wp_codebox"><table><tr id="p54417"><td class="code" id="p544code17"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem uninstall rubygems-update</pre></td></tr></table></div>

<p>That&#8217;s it. No errors any more!</p>
<h3>If you did not install Ruby 1.9.1 and Rails 3.0 yet &#8230; </h3>
<p>1. You may start with <a href="http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/">Dan Benjamin&#8217;s recipe</a> and modify it so you download, make and install the ruby-1.9.1-p378.tar.gz but NOT the rubygems-1.3.5.tgz.</p>
<p>2. Then update RubyGems with the command</p>

<div class="wp_codebox"><table><tr id="p54418"><td class="code" id="p544code18"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem update <span style="color: #660033;">--system</span></pre></td></tr></table></div>

<p>3. Ensure that the rake and the sqlite3-ruby gems are installed, too.</p>
<p>4. Now install the needed gems and rails &#8211;pre as described in the <a href="http://guides.rails.info/3_0_release_notes.html">Rails 3.0 beta release notes</a></p>
<p>5. After the successful installation of Rails 3.0 beta, you now have to do the vitally important step:</p>

<div class="wp_codebox"><table><tr id="p54419"><td class="code" id="p544code19"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem uninstall rubygems-update</pre></td></tr></table></div>

<p>6. Finally check, if any gem needs an update before diving into Rails 3.0 by</p>

<div class="wp_codebox"><table><tr id="p54420"><td class="code" id="p544code20"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem update</pre></td></tr></table></div>

<p>Hope this helps &#8230; and saves some time. Thx Andy for the hint <img src='http://www.codedifferent.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedifferent.com/2010/02/11/ruby-1-9-1-rails-3-0-fixing-invalid-gemspec-format-and-rubygem-warnings/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails or Zend Framework – deciding now!</title>
		<link>http://www.codedifferent.com/2008/04/02/ruby-on-rails-or-zend-framework-%e2%80%93-deciding-now/</link>
		<comments>http://www.codedifferent.com/2008/04/02/ruby-on-rails-or-zend-framework-%e2%80%93-deciding-now/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 07:00:28 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.codedifferent.com/2008/04/02/ruby-on-rails-or-zend-framework-%e2%80%93-deciding-now/</guid>
		<description><![CDATA[Zend Framework reached Version 1.5 since the last article about Zend or Rails. Ruby on Rails also did a big step towards version 2 – 2.0.2, too be precise So, who is my personal winner in this race? Which framework suits best for fast and innovative web application development? To say things first: My personal [...]]]></description>
			<content:encoded><![CDATA[<p>Zend Framework reached Version 1.5 since the last article about Zend or Rails. Ruby on Rails also did a big step towards version 2 – 2.0.2, too be precise <img src='http://www.codedifferent.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
So, who is my personal winner in this race? Which framework suits best for fast and innovative web application development?<br />
To say things first: My personal favorite is Ruby-on-Rails!</p>
<p>But the burning questions is: Why!</p>
<ol>
<li><strong>Ruby instead of PHP:</strong> At first it sounds rather loose to cold-shoulder the sweat and tears of learning PHP – and dig deeply into a quite young and a pure object oriented language. But everybody I talked to in the last months who came from Java or PHP just told me the same story: It’s no big deal to learn Ruby – and the benefits are overwhelming. Ruby enables you to write elegant, readable and easy to maintain code.
</li>
<li><strong>Vision-Driven-Community:</strong> No matter where you get in contact with the Rails community – at a developers conference or in a mailing-list: The basic mood and vision of the community is friendly, catching, international and productive. It’s all about creating something new, something better and more elegant with the power of the community … take a look at the <a href="http://blip.tv/file/566943">RailsConf 2007 keynote of David Heinemeier Hansson</a> in Portland.
</li>
<li><strong>Scalability:</strong> By now, there are several examples of high scaling web applications with rails. The only con of Rails applications compared to Zend framework apps is the need of a little bit more hardware. But the pros are worth it: faster development and easier maintenance. Twitter, Qype and Xing show it. Especially, the Twitter developers love to twitter about scalability, like <a href="http://www.railsconfeurope.com/presentations/railsconfeurope07/re7_brittselvitelle.pdf">Britt Selvitelle auf der RailsConf Europe 2007 </a>in Berlin.
</li>
<li><strong>REST:</strong> Version 2.0 is a big step towards the principle of Representational state transfer. Now REST is deeply implemented into the Ruby on Rails framework. This makes it easy to create consistent interfaces to other systems. REST was nearly buried in oblivion but it’s a sophisticated and strong feature based on the http protocol. Find out more by the free PDF-book of b-simple focusing on <a href="http://www.b-simple.de/documents">RESTful-Rails</a>.
</li>
<li><strong>Database-Migrations:</strong> Rails offers a powerful script based tool to create and redo database structures called migrations. For projects following the principles of “pragmatic programming” this is a perfect tool to create and improve the whole database schema and fill tables with data. Zend want to have a feature like that, too. There is a <a href="http://mingwu.wordpress.com/2008/01/07/rails-migration-in-php-zend-framework/">proposal</a> for that feature – but nobody knows when this will be implemented and how it will function.
</li>
<li><strong>Test-Driven-Development:</strong> Rails still is one of the leaders in TDD by it’s built in creation of  <a href="http://wiki.rubyonrails.com/rails/pages/HowToDoTestDrivenDevelopmentInRails">test infrastruktur for automated unit- tests, functional tests and integration tests</a>. Zend Framework tries to catch up with its ZFTestManager – but a conclusive integration into the framework is still missing.
</li>
<li><strong>MultiView:</strong> Within Rails, content can be presented in different ways according to the type of request. You easily can create different views to show the data as a CSV file, an RSS feed, a classical HTML page or as a special iPhone page. SlashDotDash shows, how easy it is to <a href="http://www.slashdotdash.net/articles/2007/12/04/iphone-on-rails-creating-an-iphone-optimised-version-of-your-rails-site-using-iui-and-rails-2">create a special iPhone optimized user interface</a> for a rails app.</li>
</ol>
<p>But there are some specific projects, which are not well suited for Rails<span id="more-101"></span>:</p>
<ul>
<li><strong>&#8230; if the application has to run on a shared-host-webspace:</strong> Rails is developed to create professional web apps. A simple webspace package at hosters like 1and1 or godaddy are not suited for the deployment of a rails app. Shared-hoster like DreamHost are positive exceptions as they offer Rails on their shared hosts. But there is a growing number of specialized hosters which offer hosting solutions suited for everybody – from private to enterprise. And sure, Rails runs perfectly on a dedicated root server. Ezra Zygmuntowicz, one of the founders of EngineYard, Bruce Tate and Clinton Begin give a lot of insights in their new book <a href="http://www.pragprog.com/titles/fr_deploy">Deploying Rails Applications: A Step-by-Step Guide</a>.
</li>
<li><strong>&#8230; if the application has to run on a Windows Server:</strong> Ruby on Rails is optimized for UNIX/LINUX based systems. It’s fast on the common web-server infrastructures like the different LINUX distributions as well as MacOS X. On Windows machines the performance is enough for development  but not enough for most deployments: Ruby on Rails is about ten times faster on non-Windows machines. So, deployments on Windows Servers are only feasible for small intranet settings where the IT department insists on using Windows as a server OS.
</li>
<li><strong>&#8230; if you only need the actual date on a static webpage.</strong> In this case Rails as well as the Zend Framework are way to big.
</li>
<li><strong>&#8230; if you as a developer do not understand an English word <img src='http://www.codedifferent.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </strong> There is a lot of information about Rails out there, and there are localized activities, like the German or Spanish user group. But the community is English focused. Not to forget institutions like <a href="http://peepcode.com/">Peepcode</a> or <a href="http://railscasts.com/">Railscasts</a>.
</li>
</ul>
<p>My2Cents</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedifferent.com/2008/04/02/ruby-on-rails-or-zend-framework-%e2%80%93-deciding-now/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

