<?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>The Dev Pages &#187; Ruby on Rails</title>
	<atom:link href="http://www.n8williams.com/devblog/category/ruby-on-rails/feed" rel="self" type="application/rss+xml" />
	<link>http://www.n8williams.com/devblog</link>
	<description>A knowledge base for simple (and beyond) web applications development</description>
	<lastBuildDate>Mon, 07 Nov 2011 08:31:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>gem install rails on VirtualBox Ubuntu guest on a Windows 7 host times out</title>
		<link>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out</link>
		<comments>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:45:12 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=220</guid>
		<description><![CDATA[Apparently if you have the network interface as NAT (the most standard one) then the gem installer has issues connecting to remote sources. Use a bridged network connection, or download all the gems you need separately for rails, and install each using the gem install GEMNAME &#8211;local command in the folder where you download the [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently if you have the network interface as NAT (the most standard one) then the gem installer has issues connecting to remote sources. Use a bridged network connection, or download all the gems you need separately for rails, and install each using the gem install GEMNAME &#8211;local command in the folder where you download the gems. (I couldn&#8217;t get the bridged connection to work either, so I just installed all the gems by downloading each gem separately. Sort of annoying, but once you know how to do it, and what the dependencies are (rails has sort of a lot, but not too bad), it is easy. Use rubygems.org and not rubyforge.org)</p>
<p>This is weird since other remote gems work fine. The link at the bottom discusses how this might be a bug or something. Very annoying though, getting to the point where you find that it isn&#8217;t a linux problem, but a virtualbox and rubygems thing.</p>
<p>To get to the nitty gritty you have to do sudo gem install -V &#8211;debug (for verbose debugging). </p>
<p>The first level of error, by using the -V verbose option will show<br />
Error fetching remote data: timed out (on some remote gem), and then eventually the non-verbose error:</p>
<p>ERROR: While executing gem &#8230; (Gem::RemoteFetcher::FetchError) timed out (http://rubygems.org/gems/rails-x.x.x.gem)</p>
<p>To get to the root of the problem, you use the &#8211;debug flag which will show</p>
<p>Exception `NameError&#8217; at YOURENV/command_manager.rb:161 &#8211; uninitialized constant<br />
Gem::Commands::InstallCommand<br />
Exception `Gem::LoadError&#8217; at YOURENV<br />
rubygems.rb:826 &#8211; Could not find RubyGem sources (> 0.0.1)<br />
Exception `Errno::ETIMEDOUT&#8217; at YOURENV/net/</p>
<p>See <a href="http://www.ruby-forum.com/topic/204146" target="_blank">http://www.ruby-forum.com/topic/204146</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing newer version of rails on ubuntu 9.10 karmic koala</title>
		<link>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala</link>
		<comments>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala#comments</comments>
		<pubDate>Sat, 27 Feb 2010 23:22:01 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=209</guid>
		<description><![CDATA[I had a bunch of weird errors, like actionpack requires a certain version of rack, etc. when trying to use the gem install rails and other such commands.
I found it easier to remove any gems that were old, and then just download each gem dependency from rubyforge.org. Then I could download each gem, go to [...]]]></description>
			<content:encoded><![CDATA[<p>I had a bunch of weird errors, like actionpack requires a certain version of rack, etc. when trying to use the gem install rails and other such commands.</p>
<p>I found it easier to remove any gems that were old, and then just download each gem dependency from rubyforge.org. Then I could download each gem, go to that download folder in the command line, and run sudo gem install <em>GEMNAME </em>- -local, and make sure the versions I wanted for everything were correct</p>
<p>ruby extconf.rb install mysql<br />
extconf.rb:1:in `require&#8217;: no such file to load &#8212; mkmf (LoadError)<br />
        from extconf.rb:1</p>
<p>Make sure the package rubyXX-dev is installed. This will stop the mkmf errors.</p>
<p>ruby extconf.rb install mysql<br />
extconf.rb:1:in `require&#8217;: no such file to load &#8212; mkmf (LoadError)<br />
        from extconf.rb:1</p>
<p>When installing the mysql gem in ubuntu make sure you have the following 3 packages installed: build-essential, rubyXX-dev, and libmysqlclientXX-dev, where the XXs correspond to your version numbers. </p>
<p>If you want to read the log, in ubuntu 9.10 with ruby 1.8.7 and rails 2.3.4 it was in /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/mkmf.log</p>
<p>Also be aware that 9.10 ubuntu&#8217;s default mysql sock appears to be /var/run/mysqld/mysqld.sock</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails and Flex using rubyamf association errors</title>
		<link>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors</link>
		<comments>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:43:16 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=196</guid>
		<description><![CDATA[I&#8217;ll have to re-duplicate the exact error message on ruby&#8217;s side. From what I recall, this was obscured by a bunch of weird error messages that were deep in the codebase for rubyamf.
Basically, if your rails server barfs a bunch of errors when you try and load activerecord objects from an amf request, one cause [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll have to re-duplicate the exact error message on ruby&#8217;s side. From what I recall, this was obscured by a bunch of weird error messages that were deep in the codebase for rubyamf.</p>
<p>Basically, if your rails server barfs a bunch of errors when you try and load activerecord objects from an amf request, one cause of this can be the fact that you have associations setup in your rubyamf_config.rb file, and there are bad or missing foreign keys in the database for linking associated tables.</p>
<p>In the following example ruby barks when an account is loaded. Account has a location_id in the database to a location. If the location record with that id does not exist, ruby does not throw a nice error.</p>
<div class="text-box">
<pre>
<code>ClassMappings.register(:actionscript =&gt; 'Account', :ruby =&gt; 'Account', :type =&gt; 'active_record',
    :attributes =&gt; ["id", "location_id", "verified", "org_id", "login", "password", "email",  "name_title", "name_first","name_middle",
        "name_last","name_suffix","phone","phone_2","phone_3","last_login_at", "created_at", "updated_at", "business", "residential"],
    <span style="color:#CC6666">:associations =&gt; ["locations"]</span>)</code>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

