<?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>geek# &#187; NetBeans</title>
	<atom:link href="http://geeksharp.com/tag/netbeans/feed/" rel="self" type="application/rss+xml" />
	<link>http://geeksharp.com</link>
	<description>techno-babble for the masses</description>
	<lastBuildDate>Thu, 27 May 2010 14:57:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing Ruby-Debug-IDE on Windows</title>
		<link>http://geeksharp.com/2009/12/18/installing-ruby-debug-ide-on-windows/</link>
		<comments>http://geeksharp.com/2009/12/18/installing-ruby-debug-ide-on-windows/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 18:24:53 +0000</pubDate>
		<dc:creator>Scott Anderson</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://geeksharp.com/2009/12/18/installing-ruby-debug-ide-on-windows/</guid>
		<description><![CDATA[Lately I’ve been trying to find a good development environment for Rails on windows.&#160; I’ve tried several different environments, but so far, I haven’t found that sweet spot, yet.&#160; My latest trial environment is utilizing the new NetBeans version 6.8.&#160; I’ve used NetBeans in the past for PHP projects and I was very happy with [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I’ve been trying to find a good development environment for Rails on windows.&#160; I’ve tried several different environments, but so far, I haven’t found that sweet spot, yet.&#160; My latest trial environment is utilizing the new <a href="http://www.netbeans.org/" target="_blank">NetBeans</a> version 6.8.&#160; I’ve used NetBeans in the past for PHP projects and I was very happy with it, so I figured if the Rails support was at least as good as the PHP support, it would be a slam dunk.&#160; After installing NetBeans I noticed that it installs it’s own version of ruby (<a href="http://jruby.org/" target="_blank">JRuby</a>), which is fine for most people, I’m sure, but I prefer to have my own Ruby environment running the official Ruby releases for Windows.&#160; Something about a Java implementation of Ruby is a turn-off for me, and besides, if I ever wanted to run an alternative Ruby implementation, it would probably end up being <a href="http://www.ironruby.net" target="_blank">IronRuby</a> because Jon Lam and Jimmy Schementi are awesome, and being able to call the .NET framework from within Ruby is very sexy.</p>
<p>Before I get going with NetBeans, I want to make sure my Ruby environment is ready.&#160; The version of Ruby I have installed is from the one-click installer on <a href="http://www.ruby-lang.org/en/downloads/" target="_blank">ruby-lang.org</a>.&#160; The current version is 1.8.6 and it’s about 25 MB.&#160; During installation, it will give you the opportunity to install rubygems, and I always check that box.&#160; Once the installer is finished, you will notice that the “gem” and “ruby” executables have been added to your path.&#160; There are 3 packages that need to be installed after that to get your Rails environment ready:</p>
<pre class="brush: plain;">gem install rails
gem install mongrel
gem install sqlite3-ruby</pre>
<p>You’ll get a lot of various “No definition” warnings when installing sqlite3-ruby which can safely be ignored.&#160; When I’m developing locally, I tend to use sqlite3 for my Rails databases because it’s quick and painless.&#160; I also prefer the Mongrel webserver over the default WEBrick because it’s much faster.</p>
<p>Now that Ruby on Rails is ready, I loaded up NetBeans for the first time.&#160; One of the nice things about NetBeans is that it detected my default Rails environment almost immediately, however when examining the settings for this environment, I noticed that the “Classic Debugger” was installed:</p>
<p><a href="http://geeksharp.com/wp-content/uploads/2009/12/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://geeksharp.com/wp-content/uploads/2009/12/image_thumb.png" width="637" height="396" /></a> </p>
<p>When I tried to click the “Install Fast Debugger” button, gem spit out some nasty errors about not being able to build the packages from source.&#160; The error it specifically stated that it couldn’t find nmake, despite the fact that I have Visual C++ 2008 Professional installed.&#160; The fix for this error was easy.&#160; I popped open a Visual Studio 2008 Command Prompt:</p>
<p><a href="http://geeksharp.com/wp-content/uploads/2009/12/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://geeksharp.com/wp-content/uploads/2009/12/image_thumb1.png" width="411" height="476" /></a> </p>
<p>From this prompt, I attempted to install the package manually by running the following command:</p>
<pre class="brush: plain;">gem install ruby-debug-ide</pre>
<p>Which ultimately lead to this lovely error:</p>
<pre class="brush: plain;">c:\ruby\lib\ruby\1.8\i386-mswin32\config.h(2) : fatal error C1189: #error :  MSC version unmatch
NMAKE : fatal error U1077: '&quot;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE&quot;' : return code '0x2'
Stop.</pre>
<p>At this point I do a little digging and find <a href="http://rubyforge.org/tracker/index.php?func=detail&amp;aid=16774&amp;group_id=1900&amp;atid=7436" target="_blank">this post on RubyForge</a> about building ruby-debug from scratch on Windows.&#160; I’m no C++ guru, but the last comment by Fred Seltzer says:</p>
<blockquote><p>Hmmm. I just hacked up my copy of config.h to no longer<br />
require the specific version of the C compiler and it built<br />
and ran just fine. I don&#8217;t want to go back and revisit<br />
this. Let&#8217;s call it closed&#8230; </p>
<p>Fredonrails&#8230;</p></blockquote>
<p>Aha!&#160; The light bulb in my head turns on and I decide to go check out this nefarious “config.h” sitting in my Ruby installation (you can see the full path in the error message above).&#160; When I open the config.h, I see the first 3 lines look something like this:</p>
<pre class="brush: cpp;">#if _MSC_VER != 1200
#error MSC version unmatch
#endif</pre>
<p>After I removed these 3 lines, I tried the command again, and alas, ruby-debug-ide installed!</p>
<p><a href="http://geeksharp.com/wp-content/uploads/2009/12/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://geeksharp.com/wp-content/uploads/2009/12/image_thumb2.png" width="632" height="388" /></a> </p>
<p>I hope this helps other folks out there to get ruby-debug-ide installed.&#160; I know it’s sort of a pain in the rear, but it worked for me.&#160; I’m pretty sure this will work with Visual C++ 2008 Express, also, but I don’t have it installed so I couldn’t confirm for sure.&#160; If you don’t mind chewing up a little hard drive space, this method will save you some time in the long run.&#160; Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://geeksharp.com/2009/12/18/installing-ruby-debug-ide-on-windows/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
