Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4036342
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:12:40+00:00 2026-05-20T12:12:40+00:00

I am trying to get the mysql gem to work … and it just

  • 0

I am trying to get the mysql gem to work … and it just doesn’t want to. Every time I do a rake db:migrate, I get

uninitialized constant MysqlCompat::MysqlRes

I’ve installed mysql from this disk image: mysql-5.5.9-osx10.6-x86_64.dmg

I’ve run the gem install with the infamous archflags setting:

sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

And the ruby version I’m using is the default from Snow Leopard:

[~/sites/testdb]$ file `which mysql`
/usr/local/mysql/bin/mysql: Mach-O 64-bit executable x86_64
[~/sites/testdb]$ file `which ruby`
/usr/bin/ruby: Mach-O universal binary with 3 architectures
/usr/bin/ruby (for architecture x86_64):    Mach-O 64-bit executable x86_64
/usr/bin/ruby (for architecture i386):  Mach-O executable i386
/usr/bin/ruby (for architecture ppc7400):   Mach-O executable ppc

My database.yml is pretty simple:

development:
  adapter: mysql
  host: 127.0.0.1
  database: testdb
  username: root
  password: 

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:12:41+00:00Added an answer on May 20, 2026 at 12:12 pm

    You can easy fix your problem.

    If you don’t use rvm:

    sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundleruby
    

    If you use rvm:

    install_name_tool -change libmysqlclient.16.dylib usr/local/mysql/lib/libmysqlclient.16.dylib [YOUR_GEMSET_PATH]/gems/mysql-2.8.1/lib/mysql_api.bundle
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just trying to get MySQL to store time in GMT... I've read the
I'm trying to get mysql gem installed for use on rails, using jruby, can't
I'm trying to get the mysql gem installed with a fresh install of Snow
I tried for about 3-4 hours trying to get the mysql gem to install
I am getting uninitialized constant MysqlCompat::MysqlRes when I run rake db:migrate. So here is
When trying to install the mysql gem from cPanel on my website, I get
I'm trying to get my mysql data in ASP.net MVC3. The mysql Database Name
I'm trying to get the $url value to display from the MySQL database but
i get this following error when i am trying to connect my localhost mysql
I'm trying to get mysql return the number of times a regex matches. something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.