could not get environment of heroku app, though changed ways to check the current environment

This commit is contained in:
Thomas Buchöster
2011-07-08 16:35:26 +02:00
committed by Thomas Buchöster
parent 2f8e936372
commit 195fbc7554
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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 -1
View File
@@ -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)
+4 -4
View File
@@ -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')
+1 -1
View File
@@ -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