How to Determine Rails Mode
An application written in Ruby on Rails can run in different modes, or environments. You can specify certain details, such as database credentials or location, based on which environment in which the application is currently running. For example, your Rails application may use a local sqlite3 database on your computer when running in development mode, but connect to an external PostgreSQL database when running in a production environment live on the Internet. You can use the "rake" command to determine the environment in which your Rails application is running.
Instructions
-
-
1
Click "Start," "All Programs," "Accessories," "System Tools" and then "Command Prompt" to open the default Microsoft Windows command prompt if you are running Rails on your local Windows machine. Click the "Terminal" icon in your dDock if you are running Rails on your local Apple machine. Launch your preferred SSH client if you are running Rails on a remote server.
-
2
Type the following to switch to the directory containing your Rails application:
cd /path/to/application
Replace "/path/to/application" with the exact path to the directory in which your Rails application resides.
-
-
3
Type the following:
rake about
Look next to "Environment" to see which mode you are currently in, such as "development."
-
1