Home Rails Dotenv
Post
Cancel

Rails Dotenv

refer to: https://github.com/bkeepers/dotenv

1. 创建 .env , Gemfile 中增加: gem 'dotenv'

2. COMMAND_OF_WHATWEB=/workspace/coding_tools/what_web/whatweb

3. 在rb 文件中调用:  ENV['COMMAND_OF_WHATWEB'] 即可。

This post is licensed under CC BY 4.0 by the author.