我正在尝试将Rails 5应用程序部署到Elastic Beanstalk,但我的日志文件中出现以下错误,表明我的主目录设置不正确。
我试着设置
HOME
按设置列出的环境变量
家
到
~/my-app-name
但我运气不好,而且它似乎也没有使用变量。我在环境配置的软件部分下设置了变量。
/var/log/eb-activity.log
:
+ cd /var/app/ondeck
+ su -s /bin/bash -c 'bundle exec
/opt/elasticbeanstalk/support/scripts/check-for-rake-task.rb assets:precompile' webapp
`/home/webapp` is not a directory.
Bundler will use `/tmp/bundler/home/webapp' as your home directory temporarily.
+ '[' false == true ']'
+ su -s /bin/bash -c 'bundle exec rake assets:precompile' webapp
`/home/webapp` is not a directory.
Bundler will use `/tmp/bundler/home/webapp' as your home directory temporarily.
rake aborted!
Psych::SyntaxError: (<unknown>): did not find expected alphabetic or numeric
character while scanning an alias at line 83 column 22
/var/app/ondeck/config/environments/production.rb:96:in `block in <top (required)>'
/var/app/ondeck/config/environments/production.rb:1:in `<top (required)>'
/var/app/ondeck/config/environment.rb:5:in `<top (required)>'
/opt/rubies/ruby-2.5.3/bin/bundle:23:in `load'
/opt/rubies/ruby-2.5.3/bin/bundle:23:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace) (Executor::NonZeroExitStatus)
我在这里发现了一个类似的问题:
issue deploying rails 5 application to AWS using Elastic Beanstalk due to rb-readline
昨天我还问了另一个关于
psych
错误(发布了下面的链接),但我开始认为此错误可能是由于对
家
.我在这一点上很迷茫,已经为此工作了几个小时,但毫无运气。
昨天我发布了另一个关于心理错误的问题:
Error Deploying on Elastic Beanstalk - Rails