Skip to content

Instantly share code, notes, and snippets.

@cdesch
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdesch/11191336 to your computer and use it in GitHub Desktop.
Save cdesch/11191336 to your computer and use it in GitHub Desktop.
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
#Bundler.require(:default, Rails.env)
module MyApp
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
social_keys = File.join(Rails.root, 'config', 'social_keys.yml')
CONFIG = HashWithIndifferentAccess.new(YAML::load(IO.read(social_keys)))[Rails.env]
CONFIG.each do |k,v|
ENV[k.upcase] ||= v
end
end
end
Error:[rake --tasks] rake aborted!
NoMethodError: undefined method `each' for nil:NilClass
/Users/cj/RubymineProjects/MyApp/config/application.rb:26:in `<class:Application>'
/Users/cj/RubymineProjects/MyApp/config/application.rb:10:in `<module:MyApp>'
/Users/cj/RubymineProjects/MyApp/config/application.rb:9:in `<top (required)>'
/Users/cj/RubymineProjects/MyApp/Rakefile:4:in `require'
/Users/cj/RubymineProjects/MyApp/Rakefile:4:in `<top (required)>'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/rake_module.rb:28:in `load'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/rake_module.rb:28:in `load_rakefile'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/application.rb:683:in `raw_load_rakefile'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/application.rb:94:in `block in load_rakefile'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/application.rb:93:in `load_rakefile'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/application.rb:77:in `block in run'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/cj/.rvm/gems/ruby-2.0.0-p451@MyApp/gems/rake-10.3.1/lib/rake/application.rb:75:in `run'
/Users/cj/RubymineProjects/MyApp/bin/rake:4:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment