I'm new to Beanstalk. I've created a Rails application and set the database production configuration to use the environment variables hopefully provided by AWS. I'm using Mysql (mysql2 gem), and want to use RDS and Passenger (I have no preference there).
On my development environment I can run the rails application with my local Mysql (it is just a basic application I've created for experimentation). I have added the passenger gem to Gemfile and bundled, but I'm using WEBBrick in development still.
The only thing I did not do by the book is that I did not use 'eb' but rather tried from the console. My application/environment failed to run as while "rake db:migrate" it still thinks I wanted it to connect to the local Mysql (I guess from the logs that it is not aware of RACK_ENV and hence uses 'development').
Any tip? I can of course try next the 'eb', yet would prefer to work with the console.
Regards, Oren
In Elastic Beanstalk (both the web console and the cli), you can pass environnement variables. If you pass the RAKE_ENV
variable, you will change your environnement.
After that you still need to pass your database parameters (db password, name, ...) which should not be hardcoded into the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With