Reputation: 65143
standard is this:
gem "mysql", "2.7"
but.. when I install this gem in the terminal, I have to run this command:
export ARCHFLAGS="-arch x86_64" ; sudo gem install --no-rdoc --no-ri mysql -v 2.7 -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config
Upvotes: 3
Views: 1011
Reputation: 13675
It's only part of the answer but it should at least get you part of the way:
bundle config build.mysql --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config --no-rdoc --no-ri
This will create .bundle/config
in your home directory, with the build options saved for the next time you're bundl'ing install.
For the second part (setting the environment variable), you could either export the variable somewhere where it would get set up permanently (eg. in your .bashrc
) or always run the command this way.
Upvotes: 4