<p>I want to display the current host and database names in a view.</p>

<p>Where can I get these names?</p>

<p>Are there some predefined environment or global variables? </p>

You can create a rails configuration object and obtain the necessary information from it:
```
```
config   = Rails::Configuration.new
host     = config.database_configuration[RAILS_ENV]["host"]
database = config.database_configuration[RAILS_ENV]["database"]
```
```
See the
documentation
for Rails::Configuration for details.