Issue #8156 has been updated by rubys (Sam Ruby).


My apologies, I have indeed verified that I can build Ruby myself successfully on Ubuntu, and have opened an issue on rvm as suggested:

https://github.com/wayneeseguin/rvm/issues/1714
----------------------------------------
Bug #8156: native extensions won't load on Ubuntu
https://bugs.ruby-lang.org/issues/8156#change-37855

Author: rubys (Sam Ruby)
Status: Third Party's Issue
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.1.0dev (2013-03-22) [x86_64-linux]


This worked with previous builds of ruby.  I've tracked it down to somewhere between revision 39832 and 39842.

$ rvm ruby-head-n39832
$ gem list mysql2*** LOCAL GEMS ***mysql2 (0.3.11)
$ ruby -r mysql2 -e 0

$ rvm ruby-head-n39842
$ gem list mysql2*** LOCAL GEMS ***mysql2 (0.3.11)
$ ruby -r mysql2 -e 0
/home/rubys/.rvm/rubies/ruby-head-n39842/lib/ruby/site_ruby/2.1.0/rubygems/custom_require.rb:36:in `require': cannot load such file -- mysql2/mysql2 (LoadError)
	from /home/rubys/.rvm/rubies/ruby-head-n39842/lib/ruby/site_ruby/2.1.0/rubygems/custom_require.rb:36:in `require'
	from /home/rubys/.rvm/gems/ruby-head-n39842/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `<top (required)>'
	from /home/rubys/.rvm/rubies/ruby-head-n39842/lib/ruby/site_ruby/2.1.0/rubygems/custom_require.rb:60:in `require'
	from /home/rubys/.rvm/rubies/ruby-head-n39842/lib/ruby/site_ruby/2.1.0/rubygems/custom_require.rb:60:in `rescue in require'
	from /home/rubys/.rvm/rubies/ruby-head-n39842/lib/ruby/site_ruby/2.1.0/rubygems/custom_require.rb:35:in `require'

$ rvm -v
rvm 1.18.21 (stable) by Wayne E. Seguin <wayneeseguin / gmail.com>, Michal Papis <mpapis / gmail.com> [https://rvm.io/]

$ lsb_release -irc
Distributor ID:	Ubuntu
Release:	12.10
Codename:	quantal

$ uname -srm
Linux 3.5.0-26-generic x86_64

Similar failures also occur sqlite3 and nokogiri.  Ruby was built using rvm.

I am not seeing the same failure with Ruby on Mac OS X 10.8.3 built using rbenv/ruby-build:

$ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0]

$ rbenv --version
rbenv 0.4.0

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.8.3
BuildVersion:	12D78

$ uname -srm
Darwin 12.3.0 x86_64


-- 
http://bugs.ruby-lang.org/