From 541a2652fef97436ae9fd27f12d075a4a4a50cb8 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Wed, 30 Apr 2014 10:54:59 +0530 Subject: [PATCH] Added info in readme for users to generate secret key before copying config file --- README.md | 9 ++++++++- config/initializers/devise.rb | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 16d48476..6a5d210f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,13 @@ git clone https://github.com/openSUSE/osem.git bundle install ``` 3. Install ImageMagick from your distribution repository -4. Copy the sample configuration files and adapt them +4. Generate secret key for devise and the rails app with +``` +rake secret +``` +Look at config/config.yml.example. + +5. Copy the sample configuration files and adapt them ``` cp config/config.yml.example config/config.yml cp config/database.yml.example config/database.yml @@ -28,6 +34,7 @@ cp config/database.yml.example config/database.yml ``` bundle exec rake db:setup ``` + 7. Run OSEM ``` rails server diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 8938168d..77208236 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -2,7 +2,7 @@ # Many of these configuration options can be set straight in your model. Devise.setup do |config| # ==> Secret key, generate one with `rake secret` - config.secret_key = 'somesecretkey1234' + config.secret_key = CONFIG['devise_secret_key'] # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer,