Rails.env vs RAILS_ENV

前端 未结 5 1015
难免孤独
难免孤独 2020-11-30 17:38

I see both in examples when checking what env one is running in. What\'s preferred? Are they, for all intents and purposes equal?

5条回答
  •  醉话见心
    2020-11-30 18:44

    Strange behaviour while debugging my app: require "active_support/notifications" (rdb:1) p ENV['RAILS_ENV'] "test" (rdb:1) p Rails.env "development"

    I would say that you should stick to one or another (and preferably Rails.env)

提交回复
热议问题