Where is the Rails.env set in rails?

when using ruby on rails, I often see Rails.env.development? Rails.env.production? Such an expression. Print Rails.env, directly to get development"s answer. I looked all over the configuration file, but I don"t know where it was configured. Is it the RAILS_ENV parameter specified at startup that you read here? And, if this RAILS_ENV parameter is not passed, the default is development?

I don"t know how to use rails, at first. Please give me some guidance. Thank you very much.

Oct.21,2021

look at document . The value of rails.env is the value of the RAILS_ENV environment variable.

  

there are two environment variables, RAILS_ENV and RACK_ENV, default to development

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bc6ed3-2fd80.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bc6ed3-2fd80.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?