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

  • Home
  • SEARCH
  • 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 7831031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:32:37+00:00 2026-06-02T11:32:37+00:00

I have Ruby and Rails installed with RVM in a Mac OS X Lion

  • 0

I have Ruby and Rails installed with RVM in a Mac OS X Lion environment.

I made Rails work properly with the mysql2 gem (using the MAMP libs rather than a mysql install). So everything was fine…

Until I’ve tried to write a standalone ruby script (out of a Rails context). And now I can’t get the mysql2 gem to work.

From within the script or from the Ruby command line (irb), the

require "mysql2"

instruction leads to the following error:

1.9.2p290 :001 > require "mysql2"
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info
  Referenced from: /Users/mick/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
  Expected in: flat namespace

dyld: Symbol not found: _mysql_get_client_info
  Referenced from: /Users/mick/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
  Expected in: flat namespace

I’ve tried several stuff:

  • export DYLD_LIBRARY_PATH=/Applications/MAMP/Library/lib/mysql/:$DYLD_LIBRARY_PATH

  • using sudo ln -s /Applications/MAMP/Library/lib/mysql/libmysqlclient.16.dylib /usr/lib/libmysqlclient.16.dylib

Nothing worked. I think I’m gonna cry soon…

  • 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-06-02T11:32:41+00:00Added an answer on June 2, 2026 at 11:32 am

    Strangely, this happened just today with a co-worker. Here’s what I did to fix it:

    gem uninstall mysql2
    brew install mysql
    gem install mysql2
    

    It was as simple as that. Hope it also works for you!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed RubyMine on Mac but my development environment for Ruby and Rails
I have installed rvm after installing Mac OS Lion. The problem which I am
I have ruby on rails installed on my ubuntu 8.10 desktop. Script/generate came up
I have standard ruby-head and Rails 3.1rc4. I installed ruby-debug with following instructions from
I'm running Ubuntu 11.10 and have installed rvm using the standard instructions listed here
I'm trying to install Ruby on rails, so first I installed RVM rvm install
I'm trying to install Ruby on Rails using RVM. I am following this guide
I'm trying to install rails 3.0.7 on Mac OSX. I'm using rvm and I've
I have installed ruby via rvm on Mint 11 no problem. Installed gems, ditto.
I have a rails 2.3.8 app. I just installed RVM, and apparently things are

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.