Railsアプリをデプロイしようとしています。
$ bundle exec cap production deploy --dry-run は問題ありません。
$ bundle exec cap production deploy:check 問題ありません。
デプロイしてみました。(エラーが発生してしまいました。)
$ bundle exec cap production deploy [d4762518] rbenv: bundle: command not found (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as daiko@145.136.9.129: bundle exit status: 127 bundle stdout: rbenv: bundle: command not found bundle stderr: Nothing written Caused by: SSHKit::Command::Failed: bundle exit status: 127 bundle stdout: rbenv: bundle: command not found bundle stderr: Nothing written Tasks: TOP => deploy:updated => bundler:install (See full trace by running task with --trace) The deploy has failed with an error: Exception while executing as daiko@145.136.9.129: bundle exit status: 127 bundle stdout: rbenv: bundle: command not found bundle stderr: Nothing written
rbenv: bundle: command not found
となっていたので VPS側で $ rbenv exec gem install bundler を実行しました。
実行した後、以下を確認 $ bundle --version Bundler version 2.0.2 $ rbenv --version rbenv 1.1.2-2-g4e92322
再度、デプロイを実行してみましたが同じエラーが出ます。
対策が分からないので、どなたかご教授のほど宜しくお願いいたします。
追記
VPS側にて$ユーザーではrbenvもbundleもバージョン表示はできましたが、
#ユーザーではどちらもcommand not foundでした。
#ユーザーにrbenvをインストールしたら、なんとかrbanvのコマンドは使えるようになりました。bundleはbundle --versionとしてもcommand not founfでした。
この状態でデプロイしても同じエラーが出ます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。