I am currently trying to run my test suite in terminal but i get the following error:
Missing required arguments: aws_access_key_id, aws_secret_access_key (ArgumentError)
I am using Carrierwave in my project and I am pretty sure that is what is causing the issue. here is my config/initializers/carrierwave.rb:
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => ENV['S3_ACCESS_KEY_ID'],
:aws_secret_access_key => ENV['S3_SECRET_ACCESS_KEY']
}
config.fog_directory = 'my_directory'
end
Here is my log:
News-MacBook-Pro:music-app yedidyaweiner$ bundle exec rspec
/Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/fog-core-1.27.2/lib/fog/core/service.rb:244:in `validate_options': Missing required arguments: aws_access_key_id, aws_secret_access_key (ArgumentError)
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/fog-core-1.27.2/lib/fog/core/service.rb:268:in `handle_settings'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/fog-core-1.27.2/lib/fog/core/service.rb:98:in `new'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/fog-core-1.27.2/lib/fog/storage.rb:25:in `new'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:83:in `eager_load_fog'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:96:in `fog_credentials='
from /Users/yedidyaweiner/projects/music-app/config/initializers/carrierwave.rb:2:in `block in <top (required)>'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:118:in `configure'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/carrierwave-0.10.0/lib/carrierwave.rb:14:in `configure'
from /Users/yedidyaweiner/projects/music-app/config/initializers/carrierwave.rb:1:in `<top (required)>'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/engine.rb:648:in `block in load_config_initializer'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.1/lib/active_support/notifications.rb:161:in `instrument'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/engine.rb:647:in `load_config_initializer'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/engine.rb:611:in `each'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/initializable.rb:44:in `each'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/yedidyaweiner/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
from /Users/yedidyaweiner/projects/music-app/config/environment.rb:5:in `<top (required)>'
from /Users/yedidyaweiner/projects/music-app/spec/rails_helper.rb:4:in `require'
from /Users/yedidyaweiner/projects/music-app/spec/rails_helper.rb:4:in `<top (required)>'
from /Users/yedidyaweiner/projects/music-app/spec/controllers/comments_controller_spec.rb:1:in `require'
from /Users/yedidyaweiner/projects/music-app/spec/controllers/comments_controller_spec.rb:1:in `<top (required)>'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `block in load_spec_files'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `each'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load_spec_files'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:97:in `setup'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:85:in `run'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/gems/rspec-core-3.0.4/exe/rspec:4:in `<top (required)>'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/bin/rspec:23:in `load'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/bin/rspec:23:in `<main>'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/yedidyaweiner/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
What do I need to do to get rid of this error and run my tests?