Skip to content

Instantly share code, notes, and snippets.

@ryansch
Created April 8, 2011 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ryansch/910925 to your computer and use it in GitHub Desktop.
Save ryansch/910925 to your computer and use it in GitHub Desktop.
mysql2 gem error
$ rake -T
(in /home/bar/foo)
rake aborted!
/usr/local/rvm/gems/ruby-1.9.2-p180@foo/gems/mysql2-0.2.7/lib/mysql2/mysql2.so: undefined symbol: rb_prohibit_interrupt - /usr/local/rvm/gems/ruby-1.9.2-p180@foo/gems/mysql2-0.2.7/lib/mysql2/mysql2.so
/home/bar/foo/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
@anildigital
Copy link

How did you solve this issue?

@ryansch
Copy link
Author

ryansch commented May 23, 2011

Honestly I can't remember. I did get it to work though.

@xinghu
Copy link

xinghu commented Jul 7, 2011

oh,I got the same error now! Could u tell me how to fix it ?

@ryansch
Copy link
Author

ryansch commented Jul 7, 2011

@xinghu: See my above reply to anildigital. I couldn't track down the solution I used to fix this. Sorry!

@swistak
Copy link

swistak commented Jan 18, 2012

For anyone who stumbles upon this again. If you're using rvm make sure to reset it. Looks like there's a bug and it sometimes chooses incorect ruby version.
For example uses ruby 1.9.2 and library from ruby 1.8.7 gemset. Obviously they don't work together

@sposmen
Copy link

sposmen commented May 25, 2018

To me with the solution was move from mysql2 version 0.3.19, that I had, to 0.4.10... some legacy code but works... started to happen when upgraded from ruby version 1.9.3-p448 to 1.9.3-p551

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