在使用Capistrano部署后,Rails(Puma& Passenger)无法找到捆绑的宝石

时间:2016-12-12 09:51:04

标签: ruby-on-rails capistrano bundler

我一直在研究PragProg Agile Rails 5的书。我挂了部署。我在Apache本地进行了直接复制/粘贴部署。但是,当我使用Capistrano进行部署时,部署完成且没有错误,但在当前版本目录中运行passengerrails s会立即失败,并说它无法找到listen gem。有什么可能触发这个的线索?

我已经bundle packagebundle --deployment了。没有帮助。我不确定Capistrano的目的是什么,但是供应商/缓存宝石不在当前的目录中,即使它们位于开发目录中。

以下是production.log中的内容。

D, [2016-12-12T18:47:37.353437 #12570] DEBUG -- :   [1m[35m (0.2ms)[0m  [1m[34mSELECT DATABASE() as db[0m
D, [2016-12-12T18:47:37.353879 #12570] DEBUG -- :   [1m[35m (0.2ms)[0m  [1m[34mSELECT GET_LOCK('2754433143543187260', 0);[0m
D, [2016-12-12T18:47:37.365473 #12570] DEBUG -- :   [1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m  [1m[34mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
D, [2016-12-12T18:47:37.375988 #12570] DEBUG -- :   [1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m  [1m[34mSELECT  `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1[0m
D, [2016-12-12T18:47:37.379731 #12570] DEBUG -- :   [1m[35m (0.2ms)[0m  [1m[35mBEGIN[0m
D, [2016-12-12T18:47:37.380950 #12570] DEBUG -- :   [1m[35m (0.2ms)[0m  [1m[35mCOMMIT[0m
D, [2016-12-12T18:47:37.381305 #12570] DEBUG -- :   [1m[35m (0.2ms)[0m  [1m[34mSELECT RELEASE_LOCK('2754433143543187260')[0m

当我访问http://localhost:8080时,Apache只是说“从应用程序收到的回复不完整”。我已经确定正确设置了密钥。

1 个答案:

答案 0 :(得分:0)

我只是重申了这个场景,事情很有效:

https://intertwingly.net/projects/AWDwR4/checkdepot-50/section-16.html

https://intertwingly.net/tmp/deploydepot.html

以下是vendor/cache中的内容:

rubys@rubixb:~/deploy/depot/releases/current$ ls vendor/cache/ activemerchant-1.62.0.gem mime-types-data-3.2016.0521.gem activemodel-serializers-xml-1.0.1.gem mini_portile2-2.1.0.gem airbrussh-1.1.1.gem minitest-5.9.1.gem arel-7.1.4.gem multi_json-1.12.1.gem bcrypt-3.1.11.gem mysql2-0.4.5.gem builder-3.2.2.gem net-scp-1.2.1.gem byebug-9.0.6.gem net-ssh-3.2.0.gem capistrano-3.7.0.gem nio4r-1.2.1.gem capistrano-bundler-1.2.0.gem nokogiri-1.6.8.1.gem capistrano-harrow-0.5.3.gem pg-0.19.0.gem capistrano-passenger-0.2.0.gem puma-3.6.2.gem capistrano-rails-1.2.0.gem rack-2.0.1.gem capistrano-rvm-0.1.2.gem rack-test-0.6.3.gem coffee-rails-4.2.1.gem rails-dom-testing-2.0.1.gem coffee-script-2.4.1.gem rails-html-sanitizer-1.0.3.gem coffee-script-source-1.11.1.gem rake-12.0.0.gem concurrent-ruby-1.0.2.gem sass-rails-5.0.6.gem debug_inspector-0.0.2.gem spring-2.0.0.gem erubis-2.7.0.gem sprockets-3.7.0.gem execjs-2.7.0.gem sprockets-rails-3.2.0.gem ffi-1.9.14.gem sqlite3-1.3.12.gem globalid-0.3.7.gem sshkit-1.11.4.gem haml-4.0.7.gem thor-0.19.4.gem i18n-0.7.0.gem thread_safe-0.3.5.gem jbuilder-2.6.1.gem tilt-2.0.5.gem jquery-rails-4.2.1.gem turbolinks-5.0.1.gem jquery-ui-rails-6.0.1.gem turbolinks-source-5.0.0.gem kaminari-0.17.0.gem tzinfo-1.2.2.gem loofah-2.0.3.gem uglifier-3.0.4.gem mail-2.6.4.gem websocket-driver-0.6.4.gem method_source-0.8.2.gem websocket-extensions-0.1.2.gem mime-types-3.1.gem