<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Duck Whistle</title>
	<atom:link href="http://duckwhistle.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://duckwhistle.wordpress.com</link>
	<description>Web design, web development, poster/flyer/newsletter design, ICT support</description>
	<lastBuildDate>Wed, 29 Dec 2010 21:19:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='duckwhistle.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/2000d63d71b5a40cfad58f1ec8f08b2a?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Duck Whistle</title>
		<link>http://duckwhistle.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://duckwhistle.wordpress.com/osd.xml" title="Duck Whistle" />
	<atom:link rel='hub' href='http://duckwhistle.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Installing HOBO on Windows with MySQL</title>
		<link>http://duckwhistle.wordpress.com/2010/12/29/installing-hobo-on-windows-with-mysql/</link>
		<comments>http://duckwhistle.wordpress.com/2010/12/29/installing-hobo-on-windows-with-mysql/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 21:08:30 +0000</pubDate>
		<dc:creator>Duck Whistle</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[hobo]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://duckwhistle.wordpress.com/?p=13</guid>
		<description><![CDATA[In November I was asked to install HOBO, an excellent extension to Ruby on Rails, on a Windows PC, using MySQL as its database. HOBO is new, and at the time, only compatible with Rails 2.  So I learned Rails &#8230; <a href="http://duckwhistle.wordpress.com/2010/12/29/installing-hobo-on-windows-with-mysql/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=duckwhistle.wordpress.com&amp;blog=13768016&amp;post=13&amp;subd=duckwhistle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In November I was asked to install HOBO, an excellent extension to Ruby on Rails, on a Windows PC, using MySQL as its database.</p>
<p>HOBO is new, and at the time, only compatible with Rails 2.  So I learned Rails 3 from a book and used various websites to fill the gaps.  (See links at the end.)</p>
<p>The version numbers are important.  I believe these combinations work:</p>
<p><strong>Ruby </strong> 1.8.7<br />
<strong>Rails</strong> 2.3.10<br />
<strong>MySQL</strong> 5.0.83<br />
<strong>HOBO</strong> 1.0.2</p>
<p>Here, I’ve used the stable releases.  Note, the Rails syntax changes between versions 2 and 3.</p>
<h2>1. Before we begin, let’s get a good, free editor that recognises Ruby syntax: <strong>Komodo Edit</strong></h2>
<ul>
<li>download version 6.0 from <a href="http://www.activestate.com/komodo-edit">http://www.activestate.com/komodo-edit</a></li>
<li>install in the usual way</li>
</ul>
<h2>2. Download and install <strong>Ruby 1.8.7</strong></h2>
<ul>
<li>from <a href="http://rubyforge.org/projects/rubyinstaller/" target="_blank">http://rubyforge.org/projects/rubyinstaller/</a> or <a href="http://rubyforge.org/frs/?group_id=167">http://rubyforge.org/frs/?group_id=167</a></li>
<li>choose file rubyinstaller-1.8.7-p302.exe</li>
<li>install to folder <strong>C:\Ruby187</strong> , tick the box “Add Ruby executables to your PATH”</li>
</ul>
<h2>3. Install the <strong>MySQL/Ruby</strong> connector gem</h2>
<ul>
<li>open a console (XP/Vista: Start, Run, “cmd”) (Win 7: Start, Search, “cmd”)</li>
<li>run <strong>cd \Ruby187</strong></li>
<li>run <strong>gem install mysql</strong>, Ignore “No definition for&#8230;” errors if they show</li>
</ul>
<h2>4. Download the <strong>MySQL 5.0</strong> installer</h2>
<ul>
<li>from <a href="http://downloads.mysql.com/archives.php?p=mysql-5.0&amp;v=5.0.87">http://downloads.mysql.com/archives.php?p=mysql-5.0&amp;v=5.0.87</a></li>
<li>choose 5.0.87 Microsoft Windows 32 Installer (<strong>mysql-essential-5.0.87-win32.msi</strong>)</li>
<li>install with default options except you must tick “Include Bin Directory in Windows Path” – make a note of the root password!</li>
</ul>
<h2>5. Copy <strong>libmySQL.dll</strong> to Ruby</h2>
<ul>
<li>copy from C:\Program Files\MySQL\MySQL Server 5.0\bin</li>
<li>copy to C:\Ruby187\bin</li>
</ul>
<h2>6. Install <strong>Rails 2.3.10 </strong>gem</h2>
<ul>
<li>in a console, still in the Ruby187 directory</li>
<li>run <strong>gem install rails &#8211;version 2.3.10</strong></li>
</ul>
<h2>7. Install <strong>HOBO Support</strong> gem</h2>
<ul>
<li>in a console, still in the Ruby187 directory</li>
<li>run <strong>gem install hobosupport</strong></li>
</ul>
<h2>8. Install <strong>HOBO </strong>gem</h2>
<ul>
<li>in a console, still in the Ruby187 directory</li>
<li>run <strong>gem install hobo</strong></li>
</ul>
<h2>9. You are now ready to build your first HOBO application.</h2>
<ul>
<li>create a directory C:\HoboApps\ (in Explorer, or the console with mkdir)</li>
<li>in a console, <strong>cd \HoboApps</strong></li>
<li>run the command <strong>hobo -d mysql MyTestApp</strong></li>
<li>this will create several directories and files in C:\HoboApps\MyTestApp</li>
</ul>
<h2>10 You need to make sure the username and password you set up for MySQL is correct in the project.</h2>
<ul>
<li>in the Komodo Edit editor, open <strong>C:\HoboApps\MyTestApp\config\database.yml</strong></li>
<li>in the “development” section, update the username and password fields</li>
<li>save the file</li>
</ul>
<h2>11. Create a simple data model.  All work for a Rails/HOBO app is done in its directory.</h2>
<ul>
<li>in the console, <strong>cd MyTestApp</strong></li>
<li>run the command <strong>ruby script/generate hobo_model_resource mytask name:string due:date status:string</strong></li>
<li>this creates the MyTask model, and the User model is also created by HOBO</li>
</ul>
<h2>12. In MySQL installations, this step may be necessary, to initialise the database.</h2>
<ul>
<li>in the console, still in the MyTestApp directory</li>
<li>run the command <strong>rake db:create</strong></li>
</ul>
<h2>13. Generate the hobo_migration for these two models</h2>
<ul>
<li>in the console, still in the MyTestApp directory</li>
<li>run the command <strong>ruby script/generate hobo_migration</strong></li>
<li>then select the “<strong>m</strong>” (migrate) option and accept any default settings then select the “<strong>g</strong>” (generate) option and press to select the default migration file name</li>
</ul>
<h2>14. [This step is covered automatically by “migrate” above, so  unless you chose “g” (generate) instead of “m”,  skip it!] Now implement the migration using the “rake” command</h2>
<ul>
<li>in the console, still in the MyTestApp directory</li>
<li>run the command <strong>rake db:migrate</strong></li>
<li>this will create the tables in the development MySQL database – you can use the usual mysql command to have a look at these, or the Rails console tool</li>
</ul>
<h2>15. You could run the app now with the default WeBrick server, but Mongrel is a better performer. Install the server gem:</h2>
<ul>
<li>in another console, <strong>cd \Ruby187</strong></li>
<li>run the command <strong>gem install mongrel</strong></li>
<li>back in the first console, still in C:\HoboApps\MyTestApp directory</li>
<li>run the command <strong>ruby script/server</strong></li>
<li>now Ruby will boot the Mongrel server by default</li>
<li>Press Ctrl+C to stop it.</li>
</ul>
<h2>16. Load your <strong>browser</strong>, enter the URL accessing the default port: <a href="http://localhost:3000/">http://localhost:3000</a></h2>
<ul>
<li>notice that Hobo uses the application folder name as the default title</li>
<li>choose the “Sign up” option – the first user to sign up will be given admin rights</li>
</ul>
<p>And there you go. Where done, login after you signup, and your app is ready for you.</p>
<p>This document is based on <a href="http://blog.insicdesigns.com/2008/10/installing-and-running-ruby-rails-and-hobo-on-windows/">http://blog.insicdesigns.com/2008/10/installing-and-running-ruby-rails-and-hobo-on-windows/</a>, with help from</p>
<ul>
<li><a href="https://github.com/tablatom/hobo/wiki/git">https://github.com/tablatom/hobo/wiki/git</a>,</li>
<li><a href="http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/vendors/MySQL-Ruby%202.7.3/mysql-ruby-windows.htm">http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/vendors/MySQL-Ruby%202.7.3/mysql-ruby-windows.htm</a>,</li>
<li><a href="http://help.rubygems.org/discussions/problems/286-error-while-executing-gem-errnoeinval-invalid-argument-c">http://help.rubygems.org/discussions/problems/286-error-while-executing-gem-errnoeinval-invalid-argument-c</a>,</li>
<li><a href="http://railsforum.com/viewtopic.php?id=34012">http://railsforum.com/viewtopic.php?id=34012</a> and</li>
<li><a href="http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-examples.htm">http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-examples.htm</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/duckwhistle.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/duckwhistle.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/duckwhistle.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/duckwhistle.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/duckwhistle.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/duckwhistle.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/duckwhistle.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/duckwhistle.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/duckwhistle.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/duckwhistle.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/duckwhistle.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/duckwhistle.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/duckwhistle.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/duckwhistle.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=duckwhistle.wordpress.com&amp;blog=13768016&amp;post=13&amp;subd=duckwhistle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://duckwhistle.wordpress.com/2010/12/29/installing-hobo-on-windows-with-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4ce3248822092257947044aa223317fd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">duckwhistle</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome</title>
		<link>http://duckwhistle.wordpress.com/2010/05/19/hello-world/</link>
		<comments>http://duckwhistle.wordpress.com/2010/05/19/hello-world/#comments</comments>
		<pubDate>Wed, 19 May 2010 21:47:41 +0000</pubDate>
		<dc:creator>Duck Whistle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://duckwhistle.wordpress.com/?p=1</guid>
		<description><![CDATA[Duck Whistle is the label for my self-employed business, working for local businesses and community groups. This blog isn&#8217;t really being used yet, so pop over to my website or follow the Twitter feed. www.duckwhistle.org.uk www.twitter.com/duckwhistle<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=duckwhistle.wordpress.com&amp;blog=13768016&amp;post=1&amp;subd=duckwhistle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Duck Whistle</strong> is the label for my self-employed business, working for local businesses and community groups.</p>
<p>This blog isn&#8217;t really being used yet, so pop over to my website or follow the Twitter feed.</p>
<p><a href="http://www.duckwhistle.org.uk">www.duckwhistle.org.uk</a></p>
<p><a href="http://www.twitter.com/duckwhistle">www.twitter.com/duckwhistle</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/duckwhistle.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/duckwhistle.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/duckwhistle.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/duckwhistle.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/duckwhistle.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/duckwhistle.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/duckwhistle.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/duckwhistle.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/duckwhistle.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/duckwhistle.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/duckwhistle.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/duckwhistle.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/duckwhistle.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/duckwhistle.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=duckwhistle.wordpress.com&amp;blog=13768016&amp;post=1&amp;subd=duckwhistle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://duckwhistle.wordpress.com/2010/05/19/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4ce3248822092257947044aa223317fd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">duckwhistle</media:title>
		</media:content>
	</item>
	</channel>
</rss>
