markbates / configatron

A super cool, simple, and feature rich configuration system for Ruby apps.

Home Page:http://www.metabates.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`store': wrong number of arguments (0 for 2) (ArgumentError)

nareshcool97 opened this issue · comments

when i try to run "rake assets:precompile RAILS_ENV=test"

it's giving me following error

/var/lib/gems/1.9.1/gems/configatron-4.5.0/lib/configatron/store.rb:51:in `store': wrong number of arguments (0 for 2) (ArgumentError)

i updated configatron 4.2.1 to 4.5.0 but no use. please help

Sorry for the delay here. Is the issue still active? Can you paste the full stack trace you get? (I suspect this'll be an error in how your code is using configatron.)

here is the full stack trace
........................
Invoke assets:precompile (first_time)
** Execute assets:precompile
/usr/bin/ruby1.9.1 /usr/local/bin/rake assets:precompile:all RAILS_ENV=test RAILS_GROUPS=assets --trace
DEPRECATION WARNING: Support for Rails < 3.2.13 will be dropped from Formtastic 3.0. (called from <top (required)> at /home/naresh/production/alphainuit/config/application.rb:11)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in DeviseSecurityExtension::Controllers::Helpers instead. (called from <top (required)> at /home/naresh/production/alphainuit/config/application.rb:11)
WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being defered until env.rb is called.
To avoid this warning, move 'gem cucumber-rails' under only group :test in your Gemfile

******** BIG DEPRECATION WARNING !! ********

Hi, Guard here.

You're including lib/guard/guard.rb ...

... which contains code deprecated over a year ago!


This file will likely be removed in the next version, so make sure you're
not requiring it anywhere to ensure safe gem upgrades.

If this message is annoying and you can't quickly fix the issue (see below),
you have 2 options:

  1) Simply set the env variable "GUARD_GEM_SILENCE_DEPRECATIONS" to "1" to
  skip this message

  2) Freeze the gem to a previous version (not recommended because upgrades
  are cool and you might forget to unfreeze later!).

  E.g. in your Gemfile:

    if Time.now > Time.new(2014,11,10)
      gem 'guard', '~> 2.8'
    else
      # Freeze until 2014-11-10 - in case we forget to change back ;)
      gem 'guard', '= 2.7.3'
    end

If you don't know which gem or plugin is requiring this file, here's a
backtrace:

/var/lib/gems/1.9.1/gems/guard-2.8.2/lib/guard/guard.rb:3:in `<top (required)>'
 >> /var/lib/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
 >> /var/lib/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
 >> /var/lib/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
 >> /var/lib/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'"

Here's how to quickly upgrade/fix this (given you are a maintainer of the
offending plugin or you want to prepare a pull request yourself):

  https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0#changes-in-guardguard

Have fun!

******** END OF DEPRECATION MESSAGE ********

** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
/var/lib/gems/1.9.1/gems/configatron-4.5.0/lib/configatron/store.rb:51:in store': wrong number of arguments (0 for 2) (ArgumentError) from /var/lib/gems/1.9.1/gems/cover_me-1.2.0/lib/cover_me/results.rb:14:inmerge_results!'
from /var/lib/gems/1.9.1/gems/cover_me-1.2.0/lib/cover_me.rb:44:in block in <top (required)>' rake aborted! Command failed with status (1): [/usr/bin/ruby1.9.1 /usr/local/bin/rake ass...] /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/file_utils.rb:55:inblock in create_shell_runner'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/file_utils.rb:45:in call' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/file_utils.rb:45:insh'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/file_utils_ext.rb:37:in sh' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/file_utils.rb:82:inruby'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/file_utils_ext.rb:37:in ruby' /var/lib/gems/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:12:inruby_rake_task'
/var/lib/gems/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:21:in invoke_or_reboot_rake_task' /var/lib/gems/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:29:inblock (2 levels) in <top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in call' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:inblock in execute'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in each' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:inexecute'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:in block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:inmon_synchronize'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in invoke_with_call_chain' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:ininvoke'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:150:in invoke_task' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:inblock (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in each' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:inblock in top_level'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:115:in run_with_threads' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:100:intop_level'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:78:in block in run' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:instandard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:in run' /var/lib/gems/1.9.1/gems/rake-10.3.2/bin/rake:33:in<top (required)>'
/usr/local/bin/rake:19:in load' /usr/local/bin/rake:19:in

'
Tasks: TOP => assets:precompile
/var/lib/gems/1.9.1/gems/configatron-4.5.0/lib/configatron/store.rb:51:in store': wrong number of arguments (0 for 2) (ArgumentError) from /var/lib/gems/1.9.1/gems/cover_me-1.2.0/lib/cover_me/results.rb:14:inmerge_results!'
from /var/lib/gems/1.9.1/gems/cover_me-1.2.0/lib/cover_me.rb:44:in `block in <top (required)>'

thank you.

@markbates looks like the cover_me gem needs an update — the name store has been a reserved Configatron name for a while: https://github.com/markbates/cover_me/blob/master/lib/cover_me/config.rb#L24. (We should probably have a better story for these reserved names, but in this case seems easiest just to fix cover_me.)

I wouldn't recommend anyone still use cover_me. It has been updated in years. I'm not maintaining it anymore. 

SimpleCov is what I would recommend for checking code coverage. It's better and actively maintained. 

https://github.com/colszowka/simplecov


Mark Bates

On Mon, Mar 23, 2015 at 1:53 PM, Greg Brockman notifications@github.com
wrote:

@markbates looks like the cover_me gem needs an update — the name store has been a reserved Configatron name for a while: https://github.com/markbates/cover_me/blob/master/lib/cover_me/config.rb#L24. (We should probably have a better story for these reserved names, but in this case seems easiest just to fix cover_me.)

Reply to this email directly or view it on GitHub:
#88 (comment)

@nareshcool97 Saw Mark's reply?

@gdb yeah i saw the reply, but i'm not working on this issue now.
thank you for the support. i will get back to you if there is something.