Mysql Gem for Ruby Enterprise Edition on Mac OSX
Comments Off I just recently installed Ruby Enterprise Edition on my Mac, but found the following errors:
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension
The reason was that the Mysql files are installed under version specific directories and files when installing from Macports. For example, mysql5 or /opt/local/lib/mysql5. This messes up the mysql gem installation because it looks elsewhere by default. The solution is to specify the exact mysql config location in the installation process:
bash-3.2# /opt/ruby-enterprise-1.8.6-20090201/bin/ruby \
/opt/ruby-enterprise-1.8.6-20090201/bin/gem install mysql \
— –with-mysql-config=/opt/local/bin/mysql_config5
That last line is two dashes (-) followed by the –with-mysql-config option.
Easy as pie.
No Comments
No comments yet.
RSS feed for comments on this post.
Sorry, the comment form is closed at this time.