LoginSignup
0
0

More than 3 years have passed since last update.

自動デプロイ時エラー発生

Last updated at Posted at 2020-02-13

エラー記述

2020年2月 AWS Capistano 自動デプロイエラー解決内容

ローカルディレクトリでbundle exec cap production deployを実行

SSHKit::::ExecuteError: Exception while executing as ec2-user@..**: No such file or directory @ rb_file_s_stat - config/secrets.yml
Caused by:
Errno::ENOENT: No such file or directory @ rb_file_s_stat - config/secrets.yml


ruby ver 2.5.1
Capistano 3.12.0
AWSサーバー
EC2

エラーが解決しません。
bundle install 実行済み 本番 ローカル
PC再起動済み
インスタンス再起動済み
nameなどの記述ミスも確認済み
本番環境のサーバー立ち上げ、ディレクトリ確認OK
kill作業→確認済み
push済み

現在解決してません。
どなたか解決に繋がる作業やヒント頂ければ幸いです。
必要な情報ファイル名指定頂ければ記述内容載せます。

解決できれば記述しておきます。

  

解決策できました

そもそもスクールの学習カリキュラムの記述を参考にしたことにより
ymlのファイルをひっパテ来れなかったからと思われます。

# set :linked_files, %w{ config/secrets.yml }

# desc 'upload secrets.yml'
# task :upload do
# on roles(:app) do |host|
# if test "[ ! -d #{shared_path}/config ]"
# execute "mkdir -p #{shared_path}/config"
# end
# upload!('config/secrets.yml', "#{shared_path}/config/secrets.yml")
# end
# end
# before :starting, 'deploy:upload'
# after :finishing, 'deploy:cleanup'

指定のymlファイルをコメントアウト

これで自動デプロイできました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0