Ruby/Rails Tip - Figaro Gem
Using Environments variables have always been recommended during (Ruby/Rails) development, primarily so your important credentials aren’t pushed online for everyone else to see.
I was embarrassed to say that I wasn’t quite sure how to set them up. In the past when I googled, I remember there being few ways, one involving your bash profile (I wrote a Ruby 2 years back about customizing your bash profile). However I never felt comfortable setting my environment variables that way.
Then I discovered the Figaro gem, once installed it creates an application.yml file that easily allows your set your project specific environment variables.
How to install
1.) Add to your Gemfile and run “bundle install”
2.) Run the generator - This creates the application.yml in your config folder
rails generate figaro:install
3.) Add your variables to the file
4.) Pushing to Heroku (Optional)
That’s it, simple as Pie.
For more info checkout the official docs