[英]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. 我正在尝试设置配置,以准备跟随Daniel Kehoe的Learn-rails教程书,但是在设置环境变量时遇到了麻烦。 The book seems to explain how to do it on Mac and Atom but not with cloud9.
该书似乎解释了如何在Mac和Atom上执行该操作,但没有对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.
我应该将环境变量放入一个名为“ .bashrc”的文件中,但由于该文件被隐藏,我不知道在哪里可以找到它。
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
您将在左侧的
Workspace->Setting Icon->Show Hidden Files
找到它,您可以单击左侧的右上角,然后单击它,然后它会显示一个列表,然后您可以单击Show Hidden Files
See the attached images 查看所附图片
then below of the left side tree 然后在左侧树的下方
Or you can use Figaro gem for the environment variable. 或者,您可以将Figaro gem用于环境变量。
Add Figaro to your Gemfile and bundle install
: 将Figaro添加到您的Gemfile并
bundle install
:
gem "figaro"
Figaro installation is easy: Figaro的安装很简单:
bundle exec figaro install
This creates a commented config/application.yml
file. 这将创建一个带注释的
config/application.yml
文件。 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 希望能帮助到你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.