- Put all you environment variable into
.env
file root of your project directory.
sudo su - -c "cd /var/app/current; /opt/elasticbeanstalk/bin/get-config --output YAML environment | sed 's/: /=/g' > .env"
- Set environment variable from
.env
file
export $(grep -v '^#' .env | xargs -d '\n')
- Run your rails console based rails environment(production/staging/test/development etc).
RAILS_ENV=production bundle exec rails c
Top comments (0)