I get this error no such file to load -- mysql2/mysql2
from Passenger in production.
Details about this error /var/www/releases/20120103021152/vendor/cache/ruby/1.9.1/gems/mysql2-0.2.18/lib/mysql2.rb
and it is true, that file doesn't not exist.
Why am I getting this error? How can I fix it?
I've got same error.
rails s
{railsroot}/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `require':
cannot load such file -- mysql2/mysql2 (LoadError)
The following has worked.
('{railsroot}/vendor/bundle/ruby/1.9.1/gems/' will depends on your system.)
cd {railsroot}/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.11/mysql2/ext
ruby extconf.rb
make
make install
cd {railsroot}/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri
ruby extconf.rb
make
make install
I ended up manually deleting all the gems inside my gems folder and running bundle install. The troublesome gem (a mysql-2.0.18 or something gem version) stopped being installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With