简体   繁体   中英

Rails (Puma & Passenger) can't find bundled gems after deploying with Capistrano

I've been working through the PragProg Agile Rails 5 book. I'm hung up on the deployment. I did a straight copy/paste deploy locally with Apache. When I deployed with Capistrano, however, the deployment completes without error, but running passenger or rails s in the current release directory fails immediately, saying that it can't find the listen gem. Any clue what could be triggering this?

I've ran bundle package and bundle --deployment . Neither helped. I'm not sure what the dirs are supposed to look like with Capistrano, but the vendor/cache gems aren't in the current dir, even though they're in the development directory.

Here's the what I got in the 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

Apache just says "Incomplete response received from application" when I visit http://localhost:8080 . I already made sure a secret key was set correctly.

I just reran the scenario, and things worked:

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

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

Here's what I have in 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM