Gemfile:找不到命令

时间:2016-11-14 06:47:17

标签: ruby-on-rails apache rubygems passenger

我们的生产轨道应用程序突然停止工作了。我无法理解它出了什么问题。项目目录中有Gemfile,即使它没有运行应用程序。

此处使用乘客登录的apache日志:

App 33785 stderr: /home/david/.bash_profile: line 17: Gemfile: command not found
App 33785 stdout: 
App 33785 stdout: 
[ 2016-11-14 10:37:27.7847 30709/7fb3784f4700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/returns_setup/customer_returns: An error occurred while starting up the preloader.
  Error ID: 1df05c28
  Error details saved to: /tmp/passenger-error-cG2Tv9.html
  Message from application: /usr/lib64/mysql/libmysqlclient.so.18: version `libmysqlclient_18' not found (required by /home/david/.rvm/gems/ruby-2.1.1/gems/mysql2-0.3.15/lib/mysql2/mysql2.so) - /home/david/.rvm/gems/ruby-2.1.1/gems/mysql2-0.3.15/lib/mysql2/mysql2.so (LoadError)
  /home/david/.rvm/gems/ruby-2.1.1/gems/mysql2-0.3.15/lib/mysql2.rb:8:in `require'
  /home/david/.rvm/gems/ruby-2.1.1/gems/mysql2-0.3.15/lib/mysql2.rb:8:in `<top (required)>'
  /home/david/.rvm/gems/ruby-2.1.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
  /home/david/.rvm/gems/ruby-2.1.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
  /home/david/.rvm/gems/ruby-2.1.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
  /home/david/.rvm/gems/ruby-2.1.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
  /home/david/.rvm/gems/ruby-2.1.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
  /home/david/.rvm/gems/ruby-2.1.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
  /home/david/.rvm/gems/ruby-2.1.1/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
  /var/www/returns_setup/customer_returns/config/application.rb:7:in `<top (required)>'
  /var/www/returns_setup/customer_returns/config/environment.rb:2:in `require'
  /var/www/returns_setup/customer_returns/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /home/david/.rvm/gems/ruby-2.1.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /home/david/.rvm/gems/ruby-2.1.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /home/david/.rvm/gems/ruby-2.1.1/gems/passenger-5.0.25/src/helper-scripts/rack-preloader.rb:110:in `eval'
  /home/david/.rvm/gems/ruby-2.1.1/gems/passenger-5.0.25/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /home/david/.rvm/gems/ruby-2.1.1/gems/passenger-5.0.25/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /home/david/.rvm/gems/ruby-2.1.1/gems/passenger-5.0.25/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /home/david/.rvm/gems/ruby-2.1.1/gems/passenger-5.0.25/src/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2016-11-14 10:37:27.7905 30709/7fb353fff700 age/Cor/Con/CheckoutSession.cpp:277 ]: [Client 4-2] Cannot checkout session because a spawning error occurred. The identifier of the error is 1df05c28. Please see earlier logs for details about the error.

非常感谢任何帮助。

编辑: 我们最近从Mysql升级到Percona

1 个答案:

答案 0 :(得分:0)

你应该重新安装/重建mysql gem。

gem uninstall mysql2
bundle install
应安装

percona dev库以成功重建gem。