bundle exec rails assets:precompile RAILS_ENV=productionが実行できない!!

実現したいこと

・Railsで作成したアプリケーションをデプロイする際にbundle exec rails assets:precompile RAILS_ENV=productionを実行したところ、
Could not open library '/home/ec2-user/SAUNER/vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/ext/libsass.so': /home/ec2-user/SAUNER/vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/ext/libsass.so: cannot open shared object file: No such file or directory.
が出てしまい実行できません。最近デプロイについて学習を初めた者でどうしたらよいかわかりません。
対応方法を何方かご教示下さい。

前提

RailのアプリをAWSにデプロイする際にbundle exec rails assets:precompile RAILS_ENV=productionを実行したところ、上記エラーが表示され実行できない

発生している問題・エラーメッセージ

bundle exec rails assets:precompile RAILS_ENV=production rails aborted! LoadError: Could not open library '/home/ec2-user/SAUNER/vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/ext/libsass.so': /home/ec2-user/SAUNER/vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/ext/libsass.so: cannot open shared object file: No such file or directory. aused by: LoadError: Could not open library '/home/ec2-user/SAUNER/vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so': /home/ec2-user/SAUNER/vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/lib/sassc/libsass.so: cannot open shared object file: No such file or directory.

該当のソースコード

試したこと

Caused byの記述があるため原因はそこだろうと推測できるのですが、どこをどのように変えらたよいかわかりません。

補足情報(FW/ツールのバージョンなど)

コメントを投稿

0 コメント