弹性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 (将#修改为@)