<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Robby on Rails: Ruby 1.8.7 on MacPorts causing some problems</title>
    <link>http://www.robbyonrails.com/articles/2008/06/20/ruby-1-8-7-on-macports-causing-some-problems</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>thoughts.sort_by{|t| t[:topic]}.collect </description>
    <item>
      <title>Ruby 1.8.7 on MacPorts causing some problems</title>
      <description>&lt;p&gt;It appears that MacPorts has upgraded to Ruby 1.8.7, which is good news if you&amp;#8217;re running Rails 2.1&amp;#8230; but if you have an older Rails application&amp;#8230; it&amp;#8217;s not going to work too well.&lt;/p&gt;


	&lt;p&gt;In order to get Ruby 1.8.6 installed with the latest MacPorts, you&amp;#8217;ll need to do the following.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  $ mkdir /Users/Shared/dports
&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;
$ svn checkout -r 36429 \ 
    http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ \ 
    /Users/Shared/dports/lang/ruby/
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Then you&amp;#8217;ll need to modify your macports to use this new local source. You&amp;#8217;ll need to edit &lt;code&gt;/opt/local/etc/macports/sources.conf&lt;/code&gt;  and add the following line above the existing rsync record.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;file:///Users/Shared/dports and create that directory&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Next, you&amp;#8217;ll want to index this new local source with the following command:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;portindex /Users/Shared/dports&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;After that, you can do the following.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port uninstall rb-rubygems ruby&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port clean rb-rubygems ruby&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo rm -r /opt/local/lib/ruby/gems/1.8/doc/rubygems-1.1.1/&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port deactivate autoconf&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install ruby rb-rubygems&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;..and hopefully you&amp;#8217;ll have Ruby 1.8.6 installed and be able to retain the rubygems you installed already.&lt;/p&gt;
</description>
      <pubDate>Fri, 20 Jun 2008 16:11:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d949213f-ee18-44ed-a39f-a644f33289ca</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/06/20/ruby-1-8-7-on-macports-causing-some-problems</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>macports</category>
      <category>ruby</category>
      <category>rubygems</category>
    </item>
  </channel>
</rss>
