I'm trying to deploy a Rails 5 app to Elastic Beanstalk but I am getting the following error in my log file that appears to indicate that my home directory is not properly set.
I tried setting the HOME
environment variable by setting HOME
to ~/my-app-name
but I have had no luck and it doesn't appear to be using the variable anyway. I set the variable under the software section in the environment configurations.
/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)
I found a a similar issue here: issue deploying rails 5 application to AWS using Elastic Beanstalk due to rb-readline
I also asked another question yesterday about the psych
error (posted link below) but I am beginning to think that this error may be caused due to the invalid reference to HOME
. I'm rather lost at this point and have been working on this for several hours with absolutely no luck.
Another question I posted yesterday about the psych error: Error Deploying on Elastic Beanstalk - Rails