I'm trying to deploy a Ruby on Rails app online using Elastic Beanstalk from AWS as part of a project. I'm using the AWS and EB CLI and I can run eb init
without a problem. However, when I try to run eb create myproject-env
it leads to this warning:
{DATE} ERROR [Instance: myInstance] Command failed on instance. Return code: 20 Output: (TRUNCATED)...dor/cache ']' + bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. You must use Bundler 2 or greater with this lockfile. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
I've tried googling the problem and I keep being lead back to this link, which makes sense as far as I can tell. The thing is, I can't figure out how to get past this error. I've tried making new IAM users and using --profile myProfile
, I've changed the user in Command Prompt, and I've uninstalled and reinstalled Bundler, awscli, and awsebcli. I'd like to keep this in the CLI just because I want to be able to use eb deploy
in the future. And I can run the app locally using Puma with no problem, so I feel like I just haven't configured something correctly with AWS.
I also can't figure out the error about using a version of Bundler 2 or higher, because I am using a higher version on my computer right now.
I'm using Rails 5.2.2, Ruby 2.4.4, and Bundler 2.0.1 and I'm using Windows Command Prompt.
Any help would be appreciated!