rails how to check environment

C++
# from app root run
rails r "puts Rails.env"
Source

Also in C++: