0

I've installed a rails app (redmine) in my hosting provider. Bundle install completed successfully, but now I'm getting this error. Error message: There was an error while trying to load the gem 'mysql2'. (Bundler::GemRequireError) Exception class: PhusionPassenger::UnknownError Application root: /home1/deintem1/rails_apps/redmine3 Backtrace:

File Line Location:

0 /home1/deintem1/ruby/gems/gems/bundler-1.11.2/lib/bundler/runtime.rb 81 in `rescue in block (2 levels) in require'

Rails MySQL2 Error

Also tried

gem install mysql2 

and

gem update mysql2 

nothing worked.

Any ideas?

Environment:

rails -v

Rails 3.2.16

gem list | grep -i 'mysql2'

activerecord-mysql2-adapter (0.0.3)
activerecord-mysql2-retry-ext (0.2.0)
activerecord-mysql2legacydb-adapter (0.2.0)
activerecord-mysql2spatial-adapter (0.4.3)
activerecord-pedantmysql2-adapter (1.1.0)
benhutton-mysql2psql (0.2.2)
em_mysql2_connection_pool (0.0.5)
ghazel-mysql2 (0.2.6.3)
glimpse-mysql2 (1.1.0)
mysql2 (0.4.3 ruby x64-mingw32 x86-mingw32 x86-mswin32-60)
mysql2-client-general_log (0.2.1)
mysql2-client-general_logs (0.1.0)
mysql2-cs-bind (0.0.6)
mysql2-metrics (0.0.1)
mysql2-sp (0.3.10)
mysql2_bigint (0.2.6.1)
mysql2_downcase (0.0.3)
mysql2_model (0.1.2)
mysql2_query_filter (0.1.1)
mysql2_query_filter-plugin-casual_log (0.1.1)
mysql2_query_filter-plugin-log (0.1.1)
mysql2_wrapper (0.0.1)
mysql2json (0.0.4)
mysql2json_es (0.0.1)
mysql2mysql (0.0.2)
mysql2psql (0.1.0)
mysql2wrapper (0.0.2)
mysql2xxxx (0.2.1)
patriot-mysql2-client (0.7.0)
peek-mysql2 (1.1.0)
rdp-mysql2 (0.2.7.1)
sequel-em_mysql2 (0.1.0)
solaris-mysql2 (0.3.11)
xmysql2psql (0.2.1)

Inside my Gemfile.lock:

mysql2 (0.3.20)
mysql2 (0.3.20-x86-mingw32)
Jack Casas
  • 914
  • 18
  • 37
  • `gem install mysql2` worked without errors? You might want to check that the version you installed matches the version in the `Gemfile.lock`. You can get the version by `gem list | grep -i 'mysql2'`. – max Apr 16 '16 at 19:52
  • installed version of is mysql2 gem is 0.3.11, so version is different from Gemfile.lock, but how can I solve this, becasue "gem install mysql2" is correctly executed – Jack Casas Apr 16 '16 at 20:46
  • Have you tried `bundle update mysql2` yet? What (if any) version requirement do you have in your `Gemfile`? One plausible cause for this that comes to mind is if the MySQL client library is updated without rebuilding the gems C component. – Marcus Ilgner Apr 16 '16 at 23:04
  • bundle update mysql2 does execute without errors, but I still get the same error – Jack Casas Apr 17 '16 at 01:39

0 Answers0