<?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>Raymond Law: Tag leopard</title>
    <link>http://blog.rayvinly.com/articles/tag/leopard</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Installing Sphinx on Mac OS X Leopard</title>
      <description>&lt;p&gt;Download the latest release from http://www.sphinxsearch.com/downloads.html&lt;/p&gt;


	&lt;p&gt;The usual&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;./configure
make
make install&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;gives me an error:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;g++  -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG   -o indexer  indexer.o libsphinx.a  -L/opt/local/lib -L/opt/local/lib/mysql5/mysql -lmysqlclient -L/opt/local/lib -lz -lm  -L/opt/local/lib -lssl -lcrypto  -liconv -lexpat  -L/usr/local/lib
Undefined symbols:
  &amp;quot;_iconv_close&amp;quot;, referenced from:
      xmlUnknownEncoding(void*, char const*, XML_Encoding*)in libsphinx.a(sphinx.o)
  &amp;quot;_iconv&amp;quot;, referenced from:
      xmlUnknownEncoding(void*, char const*, XML_Encoding*)in libsphinx.a(sphinx.o)
  &amp;quot;_iconv_open&amp;quot;, referenced from:
      xmlUnknownEncoding(void*, char const*, XML_Encoding*)in libsphinx.a(sphinx.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [indexer] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;These two articles detail how you can resolve the error:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.viget.com/extend/installing-sphinx-on-os-x-leopard/"&gt;Installing Sphinx on &lt;span class="caps"&gt;OS X&lt;/span&gt; Leopard&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blogwi.se/post/35063599/compiling-sphinx-on-leopard-with-macports-libraries"&gt;Compiling Sphinx on Leopard with MacPorts libraries&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;</description>
      <pubDate>Tue, 10 Jun 2008 13:28:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:45d61ef5-d3d1-4a50-92ec-460756e90a13</guid>
      <author>Raymond Law</author>
      <link>http://blog.rayvinly.com/articles/2008/06/10/installing-sphinx-on-mac-os-x-leopard</link>
      <category>Mac</category>
      <category>sphinx</category>
      <category>mac</category>
      <category>osx</category>
      <category>macosx</category>
      <category>leopard</category>
      <trackback:ping>http://blog.rayvinly.com/articles/trackback/64</trackback:ping>
    </item>
    <item>
      <title>Setting up Ruby on Rails, MySQL, Mongrel, memcached, and RMagick using MacPorts on Mac OS X 10.5 Leopard</title>
      <description>&lt;p&gt;I recently got the new Santa Rosa Macbook with &lt;a href="http://www.apple.com/macosx/"&gt;Leopard&lt;/a&gt; pre-installed and I need to set up the Rails development environment.&lt;/p&gt;


	&lt;p&gt;Basically there are 3 ways to achieve that:&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;1. Locomotive&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://locomotive.raaum.org/"&gt;Locomotive&lt;/a&gt; method is simple and self contained.  It works very well for Mac &lt;span class="caps"&gt;OS X 10&lt;/span&gt;.4 Tiger.  However, the author acknowledges that Locomotive  &lt;a href="http://sourceforge.net/forum/forum.php?thread_id=1858643&amp;#38;forum_id=491804"&gt;may not be Leopard ready&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;2. Rails comes with Leopard&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s right.  Apple has included Rails by default, as noted by &lt;a href="http://weblog.rubyonrails.org/2007/10/26/today-is-leopard-day"&gt;&lt;span class="caps"&gt;DHH&lt;/span&gt;&lt;/a&gt;.  This sounds great.  However, that means you will also have to manually install Imagick, RMagick, and all those other stuff that you need for development.  Also, it may be harder to upgrade Ruby or Rails when new versions come out.  You probably need to install from source to upgrade or what not&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;3. MacPorts&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;You might already have your Rails environment set up using &lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt;.  If that&amp;#8217;s the case, why not just use that?  Even if you are like me with a fresh installed Leopard, MacPorts still has its advantages.  For example, you can use MacPorts to upgrade ruby in the future.&lt;/p&gt;


	&lt;p&gt;I used MacPorts to set up my Rails environment based on these other great articles:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://teabass.com/super-simple-ruby-on-rails-install-with-macports-for-leopard/"&gt;Teabass&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/06/19/installing-ruby-on-rails-and-postgresql-on-os-x-second-edition"&gt;Robby on Rails&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://michael.biven.org/2006/12/22/starting-mongrel-or-memcached-with-launchd/"&gt;Michael Biven&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://gorn.ch/archive/2007/01/22/start-memcached-with-launchd.html"&gt; Tobias Ebn&#246;ther&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;1. Install the latest Xcode version for Leopard.  &lt;a href="http://developer.apple.com/tools/download/"&gt;Download&lt;/a&gt; from the Apple website.&lt;/p&gt;


	&lt;p&gt;2. Install the latest MacPorts version for Leopard.  &lt;a href="http://www.macports.org/"&gt;Download&lt;/a&gt; from the MacPorts website.&lt;/p&gt;


	&lt;p&gt;Run this to update MacPorts:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo port selfupdate&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;3. Install Ruby, RubyGems, and Rails.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo port install ruby
sudo port install rb-rubygems
sudo gem update --system
sudo gem install rails -y&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;4. Install MySQL (directly from Andrew Nesbitt, shown here for completeness).&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo port install mysql5 +server
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo -u mysql mysql_install_db5
cd /opt/local ; sudo /opt/local/lib/mysql5/bin/mysqld_safe &amp;amp;
sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;5. Install mongrel and mongrel_cluster.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo gem install mongrel
sudo gem install mongrel_cluster&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;6. Install memcached.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo port install memcached
sudo gem install memcache-client&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Create a file called /Library/LaunchDaemons/com.danga.memcached.plist, and insert the following:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&amp;lt;dict&amp;gt;
        &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
        &amp;lt;string&amp;gt;com.danga.memcached&amp;lt;/string&amp;gt;
        &amp;lt;key&amp;gt;OnDemand&amp;lt;/key&amp;gt;
        &amp;lt;false/&amp;gt;
        &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
        &amp;lt;array&amp;gt;
                &amp;lt;string&amp;gt;/opt/local/bin/memcached&amp;lt;/string&amp;gt;
                &amp;lt;string&amp;gt;-d&amp;lt;/string&amp;gt;
                &amp;lt;string&amp;gt;-m&amp;lt;/string&amp;gt;
                &amp;lt;string&amp;gt;64&amp;lt;/string&amp;gt;
                &amp;lt;string&amp;gt;-u&amp;lt;/string&amp;gt;
                &amp;lt;string&amp;gt;www&amp;lt;/string&amp;gt;
                &amp;lt;string&amp;gt;-p&amp;lt;/string&amp;gt;
                &amp;lt;string&amp;gt;11211&amp;lt;/string&amp;gt;
        &amp;lt;/array&amp;gt;
        &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
        &amp;lt;true/&amp;gt;
&amp;lt;/dict&amp;gt;
&amp;lt;/plist&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;In order to launch memcached on boot, enter this in the terminal:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo launchctl load -w /Library/LaunchDaemons/com.danga.memcached.plist&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;7. Install ImageMagick and RMagick&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo port install ImageMagick
sudo gem install rmagick&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;NEW&lt;/span&gt;!&lt;/strong&gt; There are now &lt;a href="http://rmagick.rubyforge.org/install-osx.html"&gt;instructions&lt;/a&gt; on how to install ImageMagick and RMagick.&lt;/p&gt;


	&lt;p&gt;8. &lt;em&gt;Optional&lt;/em&gt; &amp;#8211; I found out if you have the loaded_plugins gem installed, you may see the following error when running script/console:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:477:in `const_missing':NameError: uninitialized constant Gem::Version::NUM_RE&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;The reason is MacPorts create two directories to store the RubyGems stuff in /opt/local/lib/ruby/site_ruby and /opt/local/lib/ruby/vendor_ruby.  Ruby&amp;#8217;s $LOAD_PATH looks in site_ruby first but the version.rb in site_ruby does not define Gem::Version::NUM_RE whereas the version.rb in vendor_ruby does.  I&amp;#8217;ve outlined the issue &lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/484e09d92b2d9db4#a9adf1301cb66fc1"&gt;here&lt;/a&gt;. So I simply swap them:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;sudo mv /opt/local/lib/ruby/site_ruby /opt/local/lib/ruby/vendor_ruby_tmp
sudo mv /opt/local/lib/ruby/vendor_ruby /opt/local/lib/ruby/site_ruby
sudo mv /opt/local/lib/ruby/vendor_ruby_tmp /opt/local/lib/ruby/vendor_ruby&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;This fixes the error and everything runs well for me, but I would like to hear the experts out there about why there are separate vendor_ruby and site_ruby.&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s it.  Hope you find this helpful and please report any problems.&lt;/p&gt;</description>
      <pubDate>Thu, 29 Nov 2007 03:30:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:66dd5743-3a59-4eae-85e9-27025ffb623f</guid>
      <author>Raymond Law</author>
      <link>http://blog.rayvinly.com/articles/2007/11/29/setting-up-ruby-on-rails-with-mysql-on-mac-os-x-10-5-leopard</link>
      <category>Apple</category>
      <category>Ruby on Rails</category>
      <category>Mac</category>
      <category>Web 2.0</category>
      <category>ruby</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>apple</category>
      <category>mac</category>
      <category>macosx</category>
      <category>leopard</category>
      <category>macbook</category>
      <category>macports</category>
      <trackback:ping>http://blog.rayvinly.com/articles/trackback/37</trackback:ping>
    </item>
    <item>
      <title>My new Macbook so far</title>
      <description>&lt;p&gt;I ordered a white Santa Rosa white &lt;a href="http://www.apple.com/macbook/macbook.html"&gt;Macbook&lt;/a&gt; (comes with Leopard at 2.2GHz) from &lt;a href="http://www.apple.com/macbook/macbook.html"&gt;Amazon&lt;/a&gt; with $75 rebate and it took them a week to begin shipping on 11/19, but it arrived on 11/21, just in time for me to explore it over the Thanksgiving break.&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s what I think: So far so good.  This is my first Mac, as well as my first Apple product :)  I am happy that Amazon puts the Macbook in another brown box so that my Macbook box does not look trashy when it arrived.  So kudos to Amazon.  They are really a great place to shop at, as well as Newegg.&lt;/p&gt;


	&lt;p&gt;The box opening experience was cool but not spectacular.  I have taken some &lt;a href="http://flickr.com/photos/rayvinly/sets/72157603292875118/"&gt;pictures&lt;/a&gt; during the process.  When I took the Macbook out, I got excited and was mad at myself putting my own fingerprints on it&amp;#8230;LOL&lt;/p&gt;


	&lt;p&gt;Turned it on, saw the Apple logo, arrived at the Select Language screen.  That&amp;#8217;s it. I was not going to take anymore pictures to ruin my experience.&lt;/p&gt;


	&lt;p&gt;During the initial setup process, I heard the fan came on very loud several times and I was like: Shit, is my Macbook going to be this loud when I do anything.  Fortunately, that goes away once the setup process is over with.&lt;/p&gt;


	&lt;p&gt;The display is beautiful and I had no problems with the glossy screen.  When the display is turned off, it is glossy that you can see a reflection of yourself, but once you turn it on, it feels just like a regular &lt;span class="caps"&gt;LCD&lt;/span&gt; display, only brighter and sharper.&lt;/p&gt;


	&lt;p&gt;I am learning a lot of keyboard shortcuts and installed some applications, but there&amp;#8217;s just a lot more stuff to explore with.  So far so good.&lt;/p&gt;</description>
      <pubDate>Mon, 26 Nov 2007 11:50:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4caf4783-b627-47e5-b546-69a88a9b442a</guid>
      <author>Raymond Law</author>
      <link>http://blog.rayvinly.com/articles/2007/11/26/my-new-macbook-so-far</link>
      <category>Apple</category>
      <category>Mac</category>
      <category>apple</category>
      <category>mac</category>
      <category>macosx</category>
      <category>leopard</category>
      <category>macbook</category>
      <trackback:ping>http://blog.rayvinly.com/articles/trackback/34</trackback:ping>
    </item>
  </channel>
</rss>
