<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: I&#8217;ve got some ActiveRecord in my Shoes</title>
	<atom:link href="http://unixmonkey.net/?feed=rss2&#038;p=27" rel="self" type="application/rss+xml" />
	<link>http://unixmonkey.net/?p=27</link>
	<description>creative engineering and technological abuse</description>
	<lastBuildDate>Thu, 05 Aug 2010 19:47:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: madprog</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-18370</link>
		<dc:creator>madprog</dc:creator>
		<pubDate>Thu, 03 Sep 2009 16:17:31 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-18370</guid>
		<description>Very nice, thank you !</description>
		<content:encoded><![CDATA[<p>Very nice, thank you !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unixmonkey</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-18369</link>
		<dc:creator>Unixmonkey</dc:creator>
		<pubDate>Thu, 03 Sep 2009 15:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-18369</guid>
		<description>@madprog

This should do the trick.

&lt;pre lang=&quot;ruby&quot;&gt;
unless ActiveRecord::Base.connection.tables.include?(&#039;table_name&#039;)
  ActiveRecord::Schema.define do
    # define table
  end
end
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@madprog</p>
<p>This should do the trick.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>.<span style="color:#9900CC;">connection</span>.<span style="color:#9900CC;">tables</span>.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'table_name'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Schema</span>.<span style="color:#9900CC;">define</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#008000; font-style:italic;"># define table</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: madprog</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-18368</link>
		<dc:creator>madprog</dc:creator>
		<pubDate>Thu, 03 Sep 2009 14:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-18368</guid>
		<description>Hello,

First thank you for your post, I now know how to detect when a sqlite3 database was already created.
But would you know how to detect if a mysql database was already initialized by a ActiveRecord::Schema.define ?

I&#039;m totally new to ruby and rails (I have just begun last night ^^), so excuse me if it is trivial…</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>First thank you for your post, I now know how to detect when a sqlite3 database was already created.<br />
But would you know how to detect if a mysql database was already initialized by a ActiveRecord::Schema.define ?</p>
<p>I&#8217;m totally new to ruby and rails (I have just begun last night ^^), so excuse me if it is trivial…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alfredo</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-14685</link>
		<dc:creator>Alfredo</dc:creator>
		<pubDate>Mon, 06 Apr 2009 20:04:52 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-14685</guid>
		<description>update: I got it running, but it gets stuck while trying to install the gem and eventually fails saying it could not find the gem, here&#039;s the code: http://gist.github.com/90905</description>
		<content:encoded><![CDATA[<p>update: I got it running, but it gets stuck while trying to install the gem and eventually fails saying it could not find the gem, here&#8217;s the code: <a href="http://gist.github.com/90905" rel="nofollow">http://gist.github.com/90905</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alfredo</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-14684</link>
		<dc:creator>Alfredo</dc:creator>
		<pubDate>Mon, 06 Apr 2009 19:55:19 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-14684</guid>
		<description>@Hamza Could you post a gist? Trying to get it running on Leopard, not sure where you put the establish_connection part</description>
		<content:encoded><![CDATA[<p>@Hamza Could you post a gist? Trying to get it running on Leopard, not sure where you put the establish_connection part</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamza Khan-Cheema</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-12133</link>
		<dc:creator>Hamza Khan-Cheema</dc:creator>
		<pubDate>Tue, 03 Feb 2009 06:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-12133</guid>
		<description>Thanks for this post it has been really helpful.

Just a note though, it took me some time to get this working on Mac OS X (Tiger) with the latest version of Shoes.  It was complaining about not being able to find active_record. Even though I had it installed.

It turns out that it did not like requiring active_record in the setup block.  So I just changed the setup block so it had

gem &#039;activerecord&#039;

I then put both require statements beneath the setup block.  After that I moved the database setup stuff into the ShoesApp class at the top and all was working.

Hamza.</description>
		<content:encoded><![CDATA[<p>Thanks for this post it has been really helpful.</p>
<p>Just a note though, it took me some time to get this working on Mac OS X (Tiger) with the latest version of Shoes.  It was complaining about not being able to find active_record. Even though I had it installed.</p>
<p>It turns out that it did not like requiring active_record in the setup block.  So I just changed the setup block so it had</p>
<p>gem &#8216;activerecord&#8217;</p>
<p>I then put both require statements beneath the setup block.  After that I moved the database setup stuff into the ShoesApp class at the top and all was working.</p>
<p>Hamza.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unixmonkey</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-10951</link>
		<dc:creator>Unixmonkey</dc:creator>
		<pubDate>Mon, 22 Dec 2008 03:58:27 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-10951</guid>
		<description>@Fernando
Likely you don&#039;t already have the sqlite gem installed.  In the Shoes.setup block add a line that says &quot;gem &#039;sqlite3-ruby&#039;&quot;. That should do it. I overlooked that dependency because I already had Rails and its dependencies installed.</description>
		<content:encoded><![CDATA[<p>@Fernando<br />
Likely you don&#8217;t already have the sqlite gem installed.  In the Shoes.setup block add a line that says &#8220;gem &#8217;sqlite3-ruby&#8217;&#8221;. That should do it. I overlooked that dependency because I already had Rails and its dependencies installed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernando</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-10920</link>
		<dc:creator>Fernando</dc:creator>
		<pubDate>Sun, 21 Dec 2008 11:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-10920</guid>
		<description>I have tried to run this an I get a &quot;no driver for sqlite3 found&quot; error. 
I googled a bit and ended back here, so seem you are THE authority in the matter.
Can you give me some clue?
Is this common, or is it an issue of my installation?
Thank you in advance</description>
		<content:encoded><![CDATA[<p>I have tried to run this an I get a &#8220;no driver for sqlite3 found&#8221; error.<br />
I googled a bit and ended back here, so seem you are THE authority in the matter.<br />
Can you give me some clue?<br />
Is this common, or is it an issue of my installation?<br />
Thank you in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Quaranto</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-9966</link>
		<dc:creator>Nick Quaranto</dc:creator>
		<pubDate>Thu, 20 Nov 2008 22:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-9966</guid>
		<description>Definitely impressed. Glad to see some Shoes action going on, keep it up! :)</description>
		<content:encoded><![CDATA[<p>Definitely impressed. Glad to see some Shoes action going on, keep it up! <img src='http://unixmonkey.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mileszs</title>
		<link>http://unixmonkey.net/?p=27&#038;cpage=1#comment-9898</link>
		<dc:creator>mileszs</dc:creator>
		<pubDate>Wed, 19 Nov 2008 18:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://unixmonkey.net/?p=27#comment-9898</guid>
		<description>Nice guide, man.  Thanks!

PS - I submitted it to RubyFlow.  I hope you don&#039;t mind.</description>
		<content:encoded><![CDATA[<p>Nice guide, man.  Thanks!</p>
<p>PS &#8211; I submitted it to RubyFlow.  I hope you don&#8217;t mind.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
