在登台服务器上部署时出错

时间:2017-11-19 23:10:16

标签: ruby-on-rails deployment capistrano

我刚重新安装了我的登台服务器,但我无法部署我的代码。我在我使用的Ubuntu服务器16.04上安装了pgsql和libpq-dev。文件/srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg_ext.so确实存在。

以下是我遇到的错误:

executing "cd -- /srv/outils/www/projectname/releases/20171119230417 && RAILS_ENV=prodtest RAILS_GROUPS=assets bundle exec rake assets:precompile"
    servers: ["**.**.**.**"]
    [**.**.**.**] executing command
 ** [out :: **.**.**.**] rake aborted!
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] LoadError: libruby.so.2.3: cannot open shared object file: No such file or directory - /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg_ext.so
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg.rb:4:in `require'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg.rb:4:in `<top (required)>'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:81:in `require'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `each'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `block in require'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `each'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `require'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler.rb:114:in `require'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /srv/outils/www/projectname/releases/20171119230417/config/application.rb:11:in `<top (required)>'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /srv/outils/www/projectname/releases/20171119230417/Rakefile:6:in `require'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /srv/outils/www/projectname/releases/20171119230417/Rakefile:6:in `<top (required)>'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
 ** [out :: **.**.**.**] 
 ** [out :: **.**.**.**] (See full trace by running task with --trace)
 ** [out :: **.**.**.**] 
    command finished in 2861ms
*** [deploy:update_code] rolling back

我检查了所有我能想到的。如果我在服务器中手动执行capistrano命令,则会出现相同的错误。

1 个答案:

答案 0 :(得分:0)

我注意到了pg_est.so,但我遗漏的是libruby.so.2.3

我卸载了我的红宝石并重新安装它,现在这一步有效。