How do I set my database to production?

I know how to set the paswords and database names in database.yml,
but I haven’t found in my book
where do I set rails to use the production database ? What will be
different once I do that ?
Is prod more secure and there is less logging ? It allways uses the
dev database at the moment.

When you start your server use a -e production i.e.

ruby script/server -e production

Cam

On Jun 14, 12:23 pm, “[email protected][email protected]

Hi, you’ll need to do the following:

  1. uncomment the following in <path_to_rails_app>/config/environment.rb

    ENV[‘RAILS_ENV’] ||= ‘production’

  2. set the required fields in your
    <path_to_rails_app>/config/database.yml

Good luck,

-Conrad

I have a site hostingrails.com, I never start the server there. I’m
not sure how I would do it and I don’t recall seeing it in their docs.
I figured I must have read something on this and forgotten it, but the
method you mention I don’t ever recall reading and I have a whole
bunch of books …

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs