<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'depot application with mysql' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/66/topics/431</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>depot application with mysql posted by James Hogue @ Fri, 16 May 2008 14:23:58 -0000</title>
      <description>&lt;p&gt;Sam,&lt;/p&gt;


	&lt;p&gt;I upgraded mysql from 4.0 to 5.0 and it worked, but I had to edit /etc/my.cnf to add the &lt;span class="caps"&gt;INNODB&lt;/span&gt; stuff, so I am wondering if maybe that would have done it for 4.0 as well.  I would check for you, but I nuked 4.0 completely before installing 5.0, so going back is not really an option.  Someone else may want to check this out.&lt;/p&gt;


	&lt;p&gt;Thanks for your help!&lt;/p&gt;</description>
      <pubDate>Fri, 16 May 2008 14:23:58 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:66:431:2817</guid>
      <author>James Hogue</author>
      <link>http://forums.pragprog.com/forums/66/topics/431</link>
    </item>
    <item>
      <title>depot application with mysql posted by Sam Ruby @ Thu, 15 May 2008 15:18:41 -0000</title>
      <description>&lt;p&gt;It appears that you may have an old version of mysql installed.  More details &lt;a href="http://www.ruby-forum.com/topic/51141"&gt;here&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;In addition to the solutions mentioned on that web page, specifying :options =&amp;gt; &amp;#8220;TYPE=InnoDB&amp;#8221; on your migration may help.  See page 272 of the B1.1 version of the book for more details.&lt;/p&gt;


	&lt;p&gt;But I would recommend if you wish to proceed with MySQL that you consider upgrading it.  You can determine which version of MySQL you are running with the following command:&lt;/p&gt;


&lt;pre&gt;
mysql -h hostname -V
&lt;/pre&gt;

	&lt;p&gt;Look for the &amp;#8220;Distrib&amp;#8221; value.  You probably want to see 5.x here, and 4.x may work, but 3.x is likely to cause you problems.&lt;/p&gt;</description>
      <pubDate>Thu, 15 May 2008 15:18:41 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:66:431:2805</guid>
      <author>Sam Ruby</author>
      <link>http://forums.pragprog.com/forums/66/topics/431</link>
    </item>
    <item>
      <title>depot application with mysql posted by James Hogue @ Thu, 15 May 2008 14:42:14 -0000</title>
      <description>&lt;p&gt;I just picked up a copy of the rails 2.0 (hammock?) book and I was playing with the Depot application using mysql.  I did the following.&lt;/p&gt;


	&lt;p&gt;mysqladmin -u root create depot_development&lt;br /&gt;cd depot&lt;br /&gt;(I edited config/database.yml and commented out the line that says &amp;#8220;encoding: utf8&amp;#8221; &lt;br /&gt;ruby script/generate scaffold product title:string description:text image_url:string&lt;br /&gt;rake db:migrate&lt;/p&gt;


	&lt;p&gt;and I got the following error:&lt;/p&gt;


	&lt;p&gt;(in /home/jhogue/rails/book/depot3)&lt;br /&gt; 1 CreateProducts: migrating ==============================================&lt;br /&gt;&amp;#8212;create_table(:products)&lt;br /&gt;rake aborted!&lt;br /&gt;Mysql::Error: You have an error in your &lt;span class="caps"&gt;SQL&lt;/span&gt; syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near &amp;#8216;ENGINE=InnoDB&amp;#8217; at line 1: &lt;span class="caps"&gt;CREATE TABLE&lt;/span&gt; `products` (`id` int(11) &lt;span class="caps"&gt;DEFAULT NULL&lt;/span&gt; auto_increment &lt;span class="caps"&gt;PRIMARY KEY&lt;/span&gt;, `title` varchar(255) &lt;span class="caps"&gt;DEFAULT NULL&lt;/span&gt;, `description` text &lt;span class="caps"&gt;DEFAULT NULL&lt;/span&gt;, `image_url` varchar(255) &lt;span class="caps"&gt;DEFAULT NULL&lt;/span&gt;, `created_at` datetime &lt;span class="caps"&gt;DEFAULT NULL&lt;/span&gt;, `updated_at` datetime &lt;span class="caps"&gt;DEFAULT NULL&lt;/span&gt;) ENGINE=InnoDB&lt;/p&gt;


	&lt;p&gt;What am I missing here?&lt;br /&gt;It seems that mysql is not configured for InnoDB and rails is using that?&lt;/p&gt;</description>
      <pubDate>Thu, 15 May 2008 14:42:14 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:66:431:2801</guid>
      <author>James Hogue</author>
      <link>http://forums.pragprog.com/forums/66/topics/431</link>
    </item>
  </channel>
</rss>
