简体   繁体   中英

Where is the .bashrc file in my cloud9 app ? (Daniel Kehoe's learn-rails tutorial book)

I am trying to set up the configuration in preparation for following Daniel Kehoe's learn-rails tutorial book, but I am having trouble setting up the environment variables. The book seems to explain how to do it on Mac and Atom but not with cloud9. I am supposed to put the environment variables into a file called ".bashrc" but I don't know where to find this file as it is hidden.

You will find it on the left side Workspace->Setting Icon->Show Hidden Files , You can click on the left side upper right then click it then it will show a list then you can click Show Hidden Files

See the attached images

在此处输入图片说明

then below of the left side tree

在此处输入图片说明

Or you can use Figaro gem for the environment variable.

Add Figaro to your Gemfile and bundle install :

gem "figaro"

Figaro installation is easy:

bundle exec figaro install

This creates a commented config/application.yml file. Add your own configuration to this file and you're done!

Example

# config/application.yml

SENDGRID_USERNAME: "appxxxxxx@heroku.com"
SENDGRID_PASSWORD: "$xxxxxxxxxxxxx@"

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM