To see what a shell variable is currently set to you can echo it.

$ echo $RAILS_ENV

To set a shell variable you export it.

$ export RAILS_ENV=production