I’m migrating dumpyourtime.com to my new VPS at Linode and i had a hard time getting this rails (2.3.8) app to work on my setup (REE, Passenger 3/Apache2, MySQL, Ubuntu 10.04) because of the mysql gem.

I was getting this error on my apache error.log file: “!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.“ . I googled that error and most of the advices were to install the mysql gem with the --with-mysql-config option pointing to the mysql_config path. That didn’t work for me though.

But what did work for me was to vendor the mysql gem and then append the path of this newly-vendored mysql gem to the config.load_paths, like this:

Rails::Initializer.run do |config|
  config.load_paths <<  "#{RAILS_ROOT}/vendor/gems/mysql-2.8.1/lib/"
  ...
end

But it feels kind of wrong. So feel free to write a comment if there is a better way to handle this kind of problem!

Edit: added the vendoring step