How to get sphinx to install with mysql support using homebrew - mysql

I am attempting to get sphinx installed on my Mac OS X (10.8.3) laptop so that I can do some full text searching on a rails app using thinking sphinx.
The commands I have used for installing sphinx are:
brew install sphinx --mysql
and
brew install sphinx --with-mysql=/usr/local/mysql
Neither seem to work. Once sphinx is installed it simply says I need to install postgres or mysql in order to use it.
Does anyone know how I can force homebrew to install sphinx with mysql support?

Related

Can I install mysql on El Capitan?

I tried using brew to install mysql on OS El Capitan but got this error:
mysql: macOS Sierra or newer is required.
Error: An unsatisfied requirement failed this build.
Is there anyway I could install mysql without updating to Sierra? I don't want to have to buy an external hard drive to backup data for the update.
you can use docker for mac and run any image you want.
https://store.docker.com/editions/community/docker-ce-desktop-mac
P.S. There is no need to install MySQL or anything locally anymore.
when you run docker, to the user it seems like a local installation, everything can run on the same port. What makes a difference is easy of version and overall management.
Really, give it a try

Any way to install mysql2 GEM without installing mysql server locally

I want to use a remote MySQL database. Is there any way to install mysql2 gem in OS X without installing MySQL server locally?
Update: I found the solution. Actually, I don't need the MySQL server installed locally, I just need to install the adapter as follow..
brew install mysql-connector-c
Followed by,
gem install mysql2
Looks like the gem needs mysql installed locally to run as it uses some underlying c libraries for the client. I don't think it can work without it.
Check out https://github.com/tmtm/ruby-mysql which i believe is native ruby and may not need it, but is not compatible with 4.1.x.

Ruby Gem for mysql 5.5 in windows

We are going to use mysql 5.5 in our application for production. I did some online search and it seems that mysql2 0.2.6 is the one for mysql5.5. Is this gem good for windows as well? Any tips on how to install and manage for production?
Thanks.
The gems (either mysql or mysql2) provides an version-independent layer to the version of MySQL you are running.
However, if you're using a pre-compiled gem, it will require a version specific MySQL library be installed in your system.
To avoid that, you can use MySQL Connector/C which provides a version-independent way to connect to MySQL.
I've documented how to compile mysql gem against MySQL Connector/C in this blog post:
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
mysql2 gem has some issues on Windows so I would recommend you use mysql gem for the time being.
Hope this helps.

installing mysql as a gem

i want to develop rails 3 apps using mysql on windows 7 (64 bit) and i have installed mysql via the msi download from the mysql site.
my question is that do i still need to install the mysql gem?
thanks
The mysql gem provides the ruby bindings, so yes, you need to install this.
With Rails 3 you should use the mysql2 gem rather than the mysql gem.
Here is a proper solution for anyone interested, that doesn't mess up your current installation of mysql server
Download a zip file with mysql server 5.1 NOT the msi one. Make sure it's 32-bit NOT 64-bit. (From here)
Since there is no installer file with this, create a folder c:\mysql-gem-install - you can remove it once you finish.
Extract all the files from the zip file into the folder you just created.
now run this command
gem install mysql2 -- '--with-mysql-lib="c:\mysql-gem-install\lib\opt" --with-mysql-include="c:\mysql-gem-install\include"'
I just installed mysql2 gem v. 0.3.7
Yes you do. The mysql gem is a ruby driver (interface) to connect to the mysql database.
You should use mysql2 gem instead with Rails3.

How do I install the mysql gem without a mysql server?

I'm trying to install the mysql2 gem for a rails app on a machine with an external mysql server. The machine I'm installing onto doesn't have or need a mysql server on it. However, whenever I try to install it always checks for a mysql install and fails.
Is there an install configuration or work-around for this?
Cheers
You need just the MySQL header files to be there where the native compiling takes place.
Depending on your OS / Distribution you should find the way to install the header files without installing the actual server (Debian / Ubuntu alikes should allow you to do so with the standard apt-get, but I might be wrong).
If you are on Windows, please check this post about mysql2 gem issues on Windows.