could not get environment of heroku app, though changed ways to check the current environment
This commit is contained in:
committed by
Thomas Buchöster
parent
2f8e936372
commit
195fbc7554
@@ -7,7 +7,7 @@ require 'rake'
|
||||
|
||||
module ::Nineminutes
|
||||
class Application
|
||||
include Rake::DSL
|
||||
include Rake::DSL if Rails.env.development? or Rails.env.test?
|
||||
# Jammit.package!
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if Rails.env !=~ /production/
|
||||
if Rails.env.development? || Rails.env.test?
|
||||
APP_CONFIG = HashWithIndifferentAccess.new(YAML.load(File.open(File.join(Rails.root, 'config', 'config.yml'))))
|
||||
APP_CONFIG.each do |key, value|
|
||||
if value.is_a?(Hash)
|
||||
|
||||
@@ -183,12 +183,12 @@ Devise.setup do |config|
|
||||
# up on your models and hooks.
|
||||
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
||||
|
||||
# Facebook-Setting for Heroku
|
||||
if Rails.env =~ /production/
|
||||
if Rails.env.development? or Rails.env.test?
|
||||
config.omniauth :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET']
|
||||
else
|
||||
# Facebook-Setting for Heroku
|
||||
config.omniauth :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET']
|
||||
{:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
|
||||
else
|
||||
config.omniauth :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET']
|
||||
end
|
||||
|
||||
config.omniauth :open_id, OpenID::Store::Filesystem.new('/tmp')
|
||||
|
||||
@@ -5,5 +5,5 @@ begin
|
||||
$redis.ping
|
||||
puts "=> Established connection to redis server on '#{uri.host}' (port #{uri.port})!"
|
||||
rescue
|
||||
puts "=> CAUTION: cound not establish connection to redis server on '#{uri.host}' (port #{uri.port})! Check settings in initializer!"
|
||||
puts "=> CAUTION: could not establish connection to redis server on '#{uri.host}' (port #{uri.port})! Check settings in initializer!"
|
||||
end
|
||||
Reference in New Issue
Block a user