这3个情况下指定启动环境的格式不同,分别如下:
rails server --environment production/test/development
rails console production/test/development
rake db:migrate RAILS_ENV=production/test/development
rails c进入控制台之后通过Rails.env确认当前开发环境或者通过development/production/test?判断当前是否是某一开发环境
rails c
Rails.env
Rails.env.development/production/test?