David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said over 5 years ago on Deploying to Amazon Linux 2 :
Thanks   . Between episode prep and recording, this one did take quite a while. Mostly it was waiting for AWS to do its stuff, fixing and then waiting for AWS to do its stuff.

David Kimura PRO said over 5 years ago on Deploying to Amazon Linux 2 :
FYI to all, if you want to set up a swapfile, because you're using a small instance and not much RAM is available, you can create one when the VM is getting provisioned. I actually prefer to have a small swapfile in the event that my VM runs out of RAM, this would keep it from crashing. It is bad practice to rely on swap since it slows things down and is just overall bad practice, but it is much better than having the VM crash and die due to Out of Memory issues.

# .ebextensions/swap.config
commands:
  000_swap:
    ignoreErrors: true
    test: test ! -f /swapfile
    command: dd if=/dev/zero of=/swapfile bs=1M count=4096 && mkswap /swapfile && swapon /swapfile


David Kimura PRO said over 5 years ago on Deploying to Amazon Linux 2 :
  Try running the yarn commands manually in the EC2 instance. I'm also a bit confused. What is this pop user? Are you trying to do this within Beanstalk's EC2 instance or on your local host machine?

sudo curl --silent --location https://rpm.nodesource.com/setup_14.x | sudo bash -
sudo yum -y install nodejs

sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo
sudo yum -y install yarn




David Kimura PRO said over 5 years ago on Deploying to Amazon Linux 2 :
WIthin the EC2 instance, what do you get when you run yarn -v?

David Kimura PRO said over 5 years ago on Deploying to Amazon Linux 2 :
When you run the below, what returns?
RAILS_ENV=production bundle exec rake assets:precompile