I try to start up my Rails application (Rails 3.2.3), but I get an error message from Passenger reading:
| Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.)
|
My Gemfile already includes the line gem 'mysql2', and I've run bundle install over ssh. I've called ./bin/restart as well. This website runs fine in my development environment. What can I do?
I've seen this complaint on a number of other websites, but I haven't found an answer that applies to me because:
- I'm using Rails > 3.1
- My database.yml file correctly says to use the adapter mysql2
When I run gem list, I see mysql2 (0.3.11). when I call bundle show, however, mysql2 does not appear in the list. (Incidentally, I've also tried uninstalling mysql2 0.3.11 and using 0.2.7 but with no better success.)
asked
Jun 28 '12 at 19:23
TwitTheKnife
27●5
Have you tried manually installing the mysql2 gem using the instructions here? Specifically, by exporting the appropriate environment variables, and then installing the gem as described under the "common gems" section.
Yes, I have. But maybe I'm pointing to the wrong
mysql_configfile; I'm using the one at/usr/bin/mysql_config.The gem doesn't show up in my bundle, and I get the same error in my browser, after restarting nginx.
The command should provide the right config when 'which mysql_config' is ran as part of it. You may want to submit a support ticket so we can take a direct look.
Submitted... Back-and-forthing now.
The result: after days of support back-and-forth, they told me:
"There is not much we can do to debug the mysql2 gem or therubyracer beyond this point, as we do not provide them or work with them on a regular basis."
That's the end of their support. Has anyone got Rails>3.1 & MySQL to work?