Skip to content
mitfik edited this page Sep 3, 2012 · 2 revisions

ror_ecommarce use rails_config gem for storing all configuration and constants.

Setup

All config files are yml file where you can use also ruby syntax inside.

For Users

All configuration should be stored in:

config/settings.yml

You can copy exmaple from:

config/settings.yml.example.yml

For Developers

Remember to do not check in your config file in repository! To make sure that this will never happen you can use *.local.yml files for settings:

config/settings.local.yml

It will override all settings from config/settings.yml if there will be any. If you have some different configuration for different environment (for example credentials for payment gateway) you can put them in proper config file:

config/settings/development.yml
# or 
config/settings/production.yml
# or
config/settings/test.yml

It will override settings from config/settings.yml. If you use config/settings.local.yml you can do the same with environments files. just add *.local.yml instead of yml

Configuration options

encryption_key

random number which will be used to encrypt all important data in your application. Is very important to keep him secret. You can generate this key for example using this command:

$ dd if=/dev/urandom bs=1 count=75 2> /dev/null | xxd -p -c75

mailer

mailer:
  server: mail.example.com
  username: someLOGIN
  password: s0meth1ngs3cr3t

Credentials for mailer used in ror-e

vat

Value true || false

require_state_in_address

Value true || false

Payment gateway

to use any payment gateway (TODO: list of supported gateway) you can just configure it, by using their name. For example

paypal:
  ip:         192.168.0.1
  login:      someLOGIN.yahoo.com
  password:   somePASSWORD
  signature:  someSIGNATURE

or:

authnet:
  login:      someLOGIN
  password:   somePASSWORD