If you encounter this type of error with your not-migrated/really old Rails 3.0 apps:
/app/.bundle/ruby/2.1.0/extensions/x86-linux/2.1.0/mysql2-0.2.18/mysql2/mysql2.so: undefined symbol: __gxx_personality_v0 - /app/.bundle/ruby/2.1.0/extensions/x86-linux/2.1.0/mysql2-0.2.18/mysql2/mysql2.so (LoadError) /app/.bundle/ruby/2.1.0/gems/mysql2-0.2.18/lib/mysql2.rb:9:in `require' /app/.bundle/ruby/2.1.0/gems/mysql2-0.2.18/lib/mysql2.rb:9:in `<top (required)>' /home/deploy/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require' /home/deploy/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require' /home/deploy/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `each' /home/deploy/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require' /home/deploy/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `each' /home/deploy/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `require' /home/deploy/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2/lib/bundler.rb:131:in `require' /app/config/application.rb:3:in `<top (required)>' /app/config/environment.rb:2:in `require' /app/config/environment.rb:2:in `<top (required)>' config.ru:3:in `require' config.ru:3:in `block in <main>'
You need to change your mysql2 gem version. You can't use mysql2 gem version 0.3.*. Instead you need to use branch 0.2.*:
gem 'rails', '~> 3.0' gem 'mysql2', "~> 0.2.21"
After that just bundle install and the error should be gone.