Skip to content

Instantly share code, notes, and snippets.

@yannvery
Created September 5, 2016 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yannvery/c4515c4d2856fe6ec629fca32f796120 to your computer and use it in GitHub Desktop.
Save yannvery/c4515c4d2856fe6ec629fca32f796120 to your computer and use it in GitHub Desktop.
Load error Mysql2 with an old rails application

When you encounter

/Users/kernel/.gem/ruby/2.0.0/gems/mysql2-0.3.16/lib/mysql2.rb:8:in 
  `require': dlopen(/Users/kernel/.gem/ruby/2.0.0/gems/mysql2-0.3.16/lib/mysql2/mysql2.bundle, 9): 
    Library not loaded: 
      /usr/local/lib/libmysqlclient.18.dylib (LoadError)

Try gem pristine mysql2, this command restores installed gems to pristine condition from files located in the gem cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment