如何解决弹性beantalk耙资产:预编译错误
在弹性beantalk上部署新的Rails Webapp,即时获得资产预编译
[2020-10-16T23:42:54.285Z] ERROR [26518] : Command CMD-AppDeploy failed!
[2020-10-16T23:42:54.285Z] INFO [26518] : Command processor returning results:
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...2' as your home directory temporarily.\n+ '[' false == true ']'\n+ su -s /bin/bash -c 'bundle exec rake assets:precompile' webapp\n`/home/webapp` is not a directory.\nBundler will use `/tmp/bundler20201016-17488-1cnmx617488' as your home directory temporarily. \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh failed. For more detail,check /var/log/eb-activity.log using console or EB CLI","returncode":1,"events":[]}],"truncated":"true"}
[2020-10-16T23:44:01.593Z] DEBUG [20114] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2020-10-16T23:44:01.594Z] DEBUG [20114] : Checking if the command processor should execute...
[2020-10-16T23:44:01.599Z] DEBUG [20114] : Checking whether the command is applicable to instance (i-05a6489f233fdd2f7)..
[2020-10-16T23:44:01.599Z] INFO [20114] : Command is applicable to this instance (i-05a6489f233fdd2f7)..
[2020-10-16T23:44:01.599Z] DEBUG [20114] : Checking if the received command stage is valid..
我在网上找到了一些解决方案,但没有一个可行, 这是我尝试过的最后一个。 我添加了.ebextensions文件夹,然后添加了compile.config文件
container_commands:
01_precompile:
command: bundle exec rake assets:precompile
有关如何解决此问题的任何说明,这是一个新的rails app rails 6,具有用于js资产的webpacker,没有添加任何模型或控制器。 它在本地没有错误。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。