diff --git a/config/deploy.example.rb b/config/deploy.example.rb index 3b8b269..306d0ce 100644 --- a/config/deploy.example.rb +++ b/config/deploy.example.rb @@ -69,7 +69,7 @@ namespace :errbit do release_configs = File.join(release_path,'config') run("ln -nfs #{shared_configs}/config.yml #{release_configs}/config.yml") run("ln -nfs #{shared_configs}/mongoid.yml #{release_configs}/mongoid.yml") - run("ln -nfs #{shared_configs}/secret_token.rb #{release_configs}/initializers/secret_token.rb") + run("ln -nfs #{shared_configs}/secret_token.rb #{release_configs}/initializers/__secret_token.rb") end end diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 9c39181..57c00ae 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -14,7 +14,7 @@ else Errbit::Application.config.secret_token = ENV['SECRET_TOKEN'] # Do not raise an error if secret token is not available during assets precompilation - elsif ENV['RAILS_GROUPS'] != 'assets' + elsif ENV['RAILS_GROUPS'] != 'assets' && !Errbit::Application.config.secret_token raise <<-ERROR You must generate a unique secret token for your Errbit instance. @@ -27,9 +27,9 @@ else heroku config:add SECRET_TOKEN="$(bundle exec rake secret)" If you are deploying in some other way, please run the following command to generate a new secret token, - and commit the new `config/initializers/secret_token.rb`: + and commit the new `config/initializers/__secret_token.rb`: - echo "Errbit::Application.config.secret_token = '$(bundle exec rake secret)'" > config/initializers/secret_token.rb + echo "Errbit::Application.config.secret_token = '$(bundle exec rake secret)'" > config/initializers/__secret_token.rb ERROR end -- libgit2 0.21.2