Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 config.ru 中,我想设置一个代码块,该代码块将根据环境运行特定代码。
我尝试了一些代码,但没有任何成功。有什么建议么?
if ENV['RAKE_ENV'].to_s.eql?('development') Bundler.require(:default, :development) end
我相信你想检查ENV['RACK_ENV']而不是ENV['RAKE_ENV'].
ENV['RACK_ENV']
ENV['RAKE_ENV']