LoginSignup
0
0

More than 1 year has passed since last update.

GithubActions Errno::EACCES: Permission deniedの解決

Last updated at Posted at 2021-09-22

起こっていること

GithubActionsを用いて自動デプロイした際に急に
Errno::EACCES: Permission denied @ apply2files - のエラーがでました。

エラー内容

すごく長いので要点の箇所だけ抜粋します。

rails aborted!
Errno::EACCES: Permission denied @ apply2files - /home/***/Beginners_Camp/tmp/cache/assets/sprockets/v3.0/NT/NTu0FZHjIrwvcxJ1nnTegT5SvGLkugb1ZWoTRebr0jo.cache

~省略~

bin/rails:9:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Error: Process completed with exit code 1.

Error: Process completed with exit code 1.の意味は、
どうやら構文やファイルのミスが検出されたため、エラーになったみたいです。

解決方法

エラー原因になっているキャッシュを削除することで解決できました。
本番環境にログイン後アプリのディレクトリに移動し、
tmp以降のエラー文を貼り付け、キャッシュを削除。

rm tmp/cache/assets/sprockets/v3.0/NT/NTu0FZHjIrwvcxJ1nnTegT5SvGLkugb1ZWoTRebr0jo.cache

下記参照
https://stackoverflow.com/questions/19364940/rails-permission-denied-tmp-cache-assets-development-sprockets

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