LINUX.ORG.RU
ФорумAdmin

проблема связки passenger+redmine+apache

 , , ,


0

1

Добрый день

столкнулся с проблемой при запуске passenger+redmine+apache

ошибка We're sorry, but something went wrong.

в логах несовместимость библиотек

incompatible library version - /usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.3.21/lib/mysql2/mysql2.so (LoadError)
  /usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
  /usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
  /usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
  /usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
  /usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.3.21/lib/mysql2.rb:31:in `<top (required)>'
  /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:76:in `require'
  /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:72:in `each'
  /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:72:in `block in require'
  /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:61:in `each'
  /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:61:in `require'
  /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler.rb:131:in `require'
  /home/ubuntu/redmine-2.5.1/config/application.rb:7:in `<top (required)>'
  /home/ubuntu/redmine-2.5.1/config/environment.rb:2:in `require'
  /home/ubuntu/redmine-2.5.1/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /usr/local/rvm/gems/ruby-2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
  /usr/local/rvm/gems/ruby-2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /var/lib/gems/2.2.0/gems/passenger-5.1.6/src/helper-scripts/rack-preloader.rb:110:in `eval'
  /var/lib/gems/2.2.0/gems/passenger-5.1.6/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /var/lib/gems/2.2.0/gems/passenger-5.1.6/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /var/lib/gems/2.2.0/gems/passenger-5.1.6/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /var/lib/gems/2.2.0/gems/passenger-5.1.6/src/helper-scripts/rack-preloader.rb:29:in `<main>'

mysql -V

mysql  Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (i686) using readline 6.2

sudo gem install mysql2 — --with-mysql-config=/usr/bin/mysql_config

Fetching: mysql2-0.4.8.gem (100%)
Building native extensions with: '--with-mysql-config=/usr/bin/mysql_config'
This could take a while...
Successfully installed mysql2-0.4.8
Parsing documentation for mysql2-0.4.8
Installing ri documentation for mysql2-0.4.8
Done installing documentation for mysql2 after 1 seconds
1 gem installed

bundle install

Using mysql (2.8.1)
Using mysql2 (0.4.8)
Message from application: incompatible library version - /usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.4.8/lib/mysql2/mysql2.so (LoadError)
Как я понимаю косяк в версии mysql2.

Собственно вопрос какую версию mysql2 использовать

Возможно, поможет удаление MRI установленного из репов:

Success. I uninstalled the system ruby and now it's working as it should. Granted, I'm able to do that in my case (and others might not be able to), but the issue is that it was building with the system ruby and not the rvm ruby.

https://github.com/brianmario/mysql2/issues/721#issuecomment-173355795

Anatolik ★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.