Environment variables not loadingReport
I just set up a server on ec2 and installed all that was needed.
Trying to start my rails app from the app’s root dir in the ec2 instance using
RAILS_ENV=production rails s
gives me an error which suggests that my environment variables aren’t loading
`validate_options’: Missing required arguments: aws_access_key_id, aws_secret_access_key (ArgumentError)
I have this in my ~/.bashrc
export S3_KEY="XXXXXXXXXXX" export S3_SECRET="XXXXXXXXX" export S3_REGION="XXXXX" export S3_BUCKET="XXXXX"
RAILS_ENV=production rails s command work
and I can
curl localhost:3000 to see my homepage html
all the commands have been run on the server after ssh-ing into it.
Shouldn’t these environment variables be loaded automatically when I connect to the server using ssh?
Am I correct in assuming that since they don’t seem to be loaded unless I manually
source ~/.bashrc, my web server will not have access to them either?
solved 04 months 2 Answer 18 views 0