Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem installing mysql gem on Snow Leopard: uninitialized constant MysqlCompat::MysqlRes
    text
    copied!<p>I've got a problem trying to install the Ruby mysql gem driver.</p> <p>I recently upgraded to <strong>Snow Leopard</strong> and did the Hivelogic manual install of MySQL. This all seems to work fine as I can access mysql from the command line and make changes to the database.</p> <p>My problem is that if I now use</p> <pre><code>rake db:migrate </code></pre> <p>I get:</p> <pre><code>rake aborted! uninitialized constant MysqlCompat::MysqlRes (See full trace by running task with --trace) </code></pre> <p>Now it appears that my mysql gem isn't working correctly as I can access MySQL fine from Python using the Python driver (which I compiled to). I therefore tried to rebuild the gem using the following command from this site: <a href="http://techliberty.blogspot.com/" rel="nofollow noreferrer">http://techliberty.blogspot.com/</a>, (incidentally I am using a recent Intel MacBook Pro):</p> <pre><code> sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config </code></pre> <p>This compiles although I get No definition for the documentation:</p> <pre><code> Building native extensions. This could take a while... Successfully installed mysql-2.8.1 1 gem installed Installing ri documentation for mysql-2.8.1... No definition for next_result No definition for field_name ... </code></pre> <p>I'm a little stumped as my mysql_config is located in the correct place:</p> <pre><code> /usr/local/mysql/bin/mysql_config </code></pre> <p>And I have removed all other instances of the mysql gem, from my system.</p> <p>Any suggestions would be greatly appreciated. Many thanks.</p> <p>PS I saw this previous post <a href="https://stackoverflow.com/questions/1332207/uninitialized-constant-mysqlcompatmysqlres-using-mms2r-gem">uninitialized constant MysqlCompat::MysqlRes (using mms2r gem)</a> but it doesn't seem applicable for my version.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload