Project

General

Profile

Change environment (production, development...)

Added by Antoine Bonhomme almost 14 years ago

Hi,
I've got a production environment who works well (I use Bitnami Redmine Stack) and I would like to have a development environment.
I have configure database.yml and create the database with the same schema than productione one.
I have also change the environment.rb file and set ENV['RAILS_ENV'] ||= 'development', but I'm still connected to the production database.
what kind of operations I have to do in order to be connected to the development environment ?
Thank you !

Antoine


Replies (1)

RE: Change environment (production, development...) - Added by Felix Schäfer almost 14 years ago

  1. After any changes to configuration files, you need to restart the rails server for the changes to be noticed,
  2. Setting ENV['RAILS_ENV'] ||= 'development' in the environment.rb will make all instances using that config file switch to development mode, you won't have access to production anymore,
  3. It's not recommended to have multiple environments running on the same redmine codebase as some parts of redmine (e.g. the attachments storage) are not environment aware, I'd suggest you install and new bitnami to play with, or even better if you really want to develop stuff for it, install ruby and rails for good on your machine :-)
    (1-1/1)