<?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>Fragility &#187; mac os x</title>
	<atom:link href="http://fragility.us/tag/mac-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://fragility.us</link>
	<description></description>
	<lastBuildDate>Tue, 26 Apr 2011 22:02:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Connect to Your Local Development Sites from VirtualBox Guests</title>
		<link>http://fragility.us/2009/05/connect-to-your-local-development-sites-from-virtualbox-guests/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=connect-to-your-local-development-sites-from-virtualbox-guests</link>
		<comments>http://fragility.us/2009/05/connect-to-your-local-development-sites-from-virtualbox-guests/#comments</comments>
		<pubDate>Mon, 18 May 2009 21:51:01 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://test.fragility.us/?p=25</guid>
		<description><![CDATA[Like many web developers, I do most of my work with a web server running on my local machine.  In my case, I'm running Apache HTTPD from MacPorts on my MacBook Pro, and I have various sites in development using either Ruby or PHP.  Due to the nature of the projects, or simple because it's a good idea, I prefer to test my sites in various browsers, including Internet Explorer, which is not available on Mac OS.  So, I've set up multiple virtual machines using the freely available <a href="http://www.virtualbox.org/">VirtualBox</a>. <a href="http://fragility.us/2009/05/connect-to-your-local-development-sites-from-virtualbox-guests/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Like many web developers, I do most of my work with a web server running on my local machine.  In my case, I&#8217;m running Apache HTTPD from MacPorts on my MacBook Pro, and I have various sites in development using either Ruby or PHP.  Due to the nature of the projects, or simply because it&#8217;s a good idea, I prefer to test my sites in various browsers, including Internet Explorer, which is not available on Mac OS.  So, I&#8217;ve set up multiple virtual machines using the freely available <a href="http://www.virtualbox.org/">VirtualBox</a>.</p>
<p>I&#8217;ve set up aliases to localhost, and corresponding NameVirtualHost settings for Apache, on my Mac for each of the sites I&#8217;m developing.  Then I can just enter, for example, &#8220;myproject.local&#8221; in my browser, and view my work in progress.  (I use the nice Ruby gem &#8220;<a href="http://github.com/bjeanes/ghost/tree/master">ghost</a>&#8221; to manage aliases.)  However, this doesn&#8217;t work with a default VirtualBox guest, so below is my method for getting this to work.</p>
<h2>Start the VirtualBox VM Manager</h2>
<ol>
<li>To begin, start your install of VirtualBox.  I believe that you need at least version 2.2.0, which introduced host-only networking.<br />
<img class="alignnone size-full wp-image-9" title="vbox_start" src="http://test.fragility.us/wp-content/uploads/2009/08/vbox_start.png" alt="vbox_start" width="642" height="487" /></li>
<li>Open the settings for the desired VM and navigate to the Network tab.  You should already have something in the Adapter 1 section.<br />
<img class="alignnone size-full wp-image-6" title="vbox_adapter1" src="http://test.fragility.us/wp-content/uploads/2009/08/vbox_adapter1.png" alt="vbox_adapter1" width="568" height="338" /></li>
</ol>
<h2>Add a Local-Only Network Interface</h2>
<ol>
<li>Click on the Adapter 2 tab.  You should typically see a disabled interface, something like this:<br />
<img class="alignnone size-full wp-image-7" title="vbox_adapter2" src="http://test.fragility.us/wp-content/uploads/2009/08/vbox_adapter2.png" alt="vbox_adapter2" width="568" height="338" /></li>
<li>Enable Adapter 2 by checking the box.  Then change the &#8220;Attached to:&#8221; box to &#8220;Host-only Adapter.&#8221;  The Name box shows &#8220;vboxnet0&#8243; on my install:<br />
<img class="alignnone size-full wp-image-8" title="vbox_adapter2_new" src="http://test.fragility.us/wp-content/uploads/2009/08/vbox_adapter2_new.png" alt="vbox_adapter2_new" width="568" height="338" /></li>
<li>Save your settings and start your virtual machine.</li>
</ol>
<h2>Verify Host-Only Adapter Address</h2>
<p>VirtualBox should create a new network interface on your host OS that is used for host-only networking.  On Mac OS, verify this by entering the following in a Terminal:</p>
<p>ifconfig vboxnet0</p>
<p>You should see something like the following.  Note the IP address &#8211; you will need it later:</p>
<p>vboxnet0: flags=8943</p>
<h2>Set up Guest OS</h2>
<p>You need to set up host aliases in your guest OS that match those you set up in your host, only that you will point them to the IP address you noted previously.  The following instructions apply to Windows XP and newer.</p>
<ol>
<li>Open your hosts file.  Use Start -&gt; Run&#8230; and enter &#8220;notepad c:WINDOWSsystem32driversetchosts&#8221;.  <strong>UPDATE</strong>: On Windows Vista and Windows 7, there are additional protections on this file.  You will have to run Notepad (or your favorite text editor) as Administrator first &#8211; right click on its shortcut and choose &#8220;Run as administrator.&#8221;</li>
<li>Add a line to the file that associates your host-only IP address with your development site aliases.  The IP address comes first, followed by each alias, separated by spaces.
<pre><code>192.168.56.1    myproject.local otherproject.local</code></pre>
</li>
</ol>
<h2>Test the Configuration</h2>
<p>As long as your local web server is running on the host OS, you should be able to enter one of your site aliases in the guest&#8217;s browser and get the expected results.</p>
]]></content:encoded>
			<wfw:commentRss>http://fragility.us/2009/05/connect-to-your-local-development-sites-from-virtualbox-guests/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installing PostgreSQL on Mac OS X</title>
		<link>http://fragility.us/2009/03/installing-postgresql-on-mac-os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-postgresql-on-mac-os-x</link>
		<comments>http://fragility.us/2009/03/installing-postgresql-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 21:38:31 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://test.fragility.us/?p=14</guid>
		<description><![CDATA[Here is what I did to get PostgreSQL and the postgres ruby gem installed on Mac OS X Leopard.  This post is more for my personal reference, but if anyone finds it useful, so be it.  There are other posts around that deal with the same issue, but I've not found one that has the complete picture. <a href="http://fragility.us/2009/03/installing-postgresql-on-mac-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is what I did to get PostgreSQL and the pg ruby gem installed on Mac OS X Leopard.  This post is more for my personal reference, but if anyone finds it useful, so be it.  There are other posts around that deal with the same issue, but I&#8217;ve not found one that has the complete picture.</p>
<h2>Prerequisites</h2>
<p>I&#8217;m using the Ruby and RubyGems that come installed with Leopard.</p>
<p>You will need to install the following first:</p>
<ul>
<li><a href="http://developer.apple.com/tools/">XCode Developer Tools</a></li>
<li><a href="http://www.macports.org/">MacPorts</a></li>
</ul>
<h2>Installing PostgreSQL</h2>
<p>Install PostgreSQL from MacPorts using the following command in your Terminal:</p>
<pre class="brush:bash">sudo port install postgresql84 postgresql84-server</pre>
<p>Make sure to follow the instructions printed at the end of the installation, so that you can set up PostgreSQL to start automatically.</p>
<h2>Installing pg Gem</h2>
<p><strong>Update</strong>: The &#8220;pg&#8221; gem is considered the most current of those that provide a PostgreSQL access layer.  I previously mentioned the &#8220;postgres&#8221; gem.</p>
<p>This is the part that might trip you up if you try the standard <code>gem install pg</code> route.  There are two ways to ensure that this works.</p>
<p>The first is to ensure that the directory containing PostgreSQL executables (notably pg_config) is in your PATH.  You can add the following to /etc/profile:</p>
<pre class="brush:bash">export PATH=/opt/local/lib/postgresql84/bin:$PATH</pre>
<p>Then run <code>sudo gem install pg</code> as usual.</p>
<p>If you do not modify your PATH, use the following in your Terminal instead so that the PostgreSQL headers and libraries are found:</p>
<pre class="brush:bash">sudo env ARCHFLAGS="-arch i386"
  gem install pg --
  --with-pgsql-include=/opt/local/include/postgresql84
  --with-pgsql-lib=/opt/local/lib/postgresql84</pre>
<p><strong>Update:</strong> On Mac OS X 10.6 Snow Leopard, you may need to use &#8220;x86_64&#8243; instead of &#8220;i386&#8243; in the above command.</p>
<p>I hope that&#8217;s the full story&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://fragility.us/2009/03/installing-postgresql-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

