<?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>So Many Fish &#187; Rspec</title>
	<atom:link href="http://www.lisasawin.com/category/rspec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lisasawin.com</link>
	<description>...which is pretty cool when you think about it...</description>
	<lastBuildDate>Fri, 26 Aug 2011 01:16:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Running Rspec tests in TextMate</title>
		<link>http://www.lisasawin.com/2008/05/24/running-rspec-tests-in-textmate/</link>
		<comments>http://www.lisasawin.com/2008/05/24/running-rspec-tests-in-textmate/#comments</comments>
		<pubDate>Sat, 24 May 2008 16:45:56 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rspec]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=4</guid>
		<description><![CDATA[For a while I had a problem running my Rspec tests using the TextMate bundle.  It was calling the wrong lib for Ruby, even though I had the shell variables set correctly in the TextMate preferences.  When I tried to run a spec in TextMate, I got this: /usr/lib/ruby/site_ruby/1.8/rubygems.rb:377:in `report_activate_error’: Could not find RubyGem rails [...]]]></description>
			<content:encoded><![CDATA[<p>For a while I had a problem running my Rspec tests using the TextMate bundle.  It was calling the wrong lib for Ruby, even though I had the shell variables set correctly in the TextMate preferences.  When I tried to run a spec in TextMate, I got this:</p>
<blockquote style="overflow:scroll"><p>/usr/lib/ruby/site_ruby/1.8/rubygems.rb:377:in<br />
`report_activate_error’: Could not find RubyGem rails (&gt;= 0)<br />
(Gem::LoadError) from<br />
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:309:in `activate’ from<br />
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:76:in<br />
`active_gem_with_options’ from<br />
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:50:in `gem’ from<br />
/Users/lisasawin/Rails Web Applications/CHC/config/boot.rb:39 from<br />
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in<br />
`gem_original_require’ from<br />
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’<br />
from /Users/lisasawin/Rails Web Applications<br />
/CHC/config/environment.rb:11 from<br />
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in<br />
`gem_original_require’ … 15 levels… from<br />
/Users/lisasawin/Library/Application<br />
Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:31:in<br />
`chdir’ from<br />
/Users/lisasawin/Library/Application<br />
Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:31:in<br />
`run’ from<br />
/Users/lisasawin/Library/Application<br />
Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:14:in<br />
`run_file’ from /tmp/temp_textmate.zQ2Hv1:4</p></blockquote>
<p> </p>
<p>I just couldn’t get TextMate to use the library in usr/local/bin/ruby instead  of looking in usr/lib/ruby,  I gave up for a while and ran tests manually in a shell, but that was a pain.  Another web search led me to <a href="http://blog.dnite.org/2007/8/28/textmate-and-your-environment-variables/comments/7006#comment-7006"><span><strong>dnite’s blog</strong></span></a>.  He described how to set up a new ~/.MacOSX/environment.plist with the correct PATH definition:</p>
<blockquote style="overflow:scroll"><p> &lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt; &lt;!DOCTYPE plist PUBLIC &#8220;-//Apple Computer//DTD PLIST 1.0//EN&#8221;<br />
 &lt;plist version=&#8221;1.0&#8243;&gt;<br />
 &lt;dict&gt;<br />
     &lt;key&gt;PATH&lt;/key&gt;<br />
  &lt;string&gt;/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin&lt;/string&gt;<br />
 &lt;/dict&gt;<br />
 &lt;/plist&gt;</p></blockquote>
<p>Don’t forget to log out &amp; in for it to take effect.  Worked for me!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2008/05/24/running-rspec-tests-in-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

