1
NoMethodError: undefined method `color_enabled='  for #<RSpec::Core::Configuration:0x007ff1ba922ad0> 
from /Users/apple/.rvm/gems/ruby-2.0.0-p247@global/gems/rspec-console-0.2.7/lib/rspec-console/config_cache.rb:69:in `method_missing'

I do not know how to solve it~

any suggestion? thx~

2
  • 1
    The is extremely broad and shows an extreme lack of effort. Could you please elaborate on how the error is produced, and what you have looked at in trying to solve it!
    – MrAlias
    Aug 17, 2014 at 17:13
  • what I already try: update pry. update all gem. google this error message, and find that rspec core Remove color_enabled as an alias of color. (Jon Rowe). (github.com/rspec/rspec-core/blob/master/Changelog.md). I set config.color_enabled = true, but it was no use. config.color = true was no use too.
    – Hung Yi Ho
    Aug 18, 2014 at 2:55

2 Answers 2

7

I ran into this same error when upgrading to rspec-core 3.1.7. I fixed this particular issue by changing

config.color_enabled = true

to

config.color = true

in spec_helper.rb. However, I encounter additional rspec errors and decided to revert to rspec-core 2.14.8 for now.

0

After set

gem 'rspec-rails', '~> 2.14.2' gem 'rspec-console', '~> 0.2.7'

everything work fine, I think this issue is rspec and rspec-console version conflict problem. Maybe it is related to https://github.com/nviennot/rspec-console/pull/14 .

1
  • This is because the config option changed after rspec 3.1, change the config option in the answer above to get it working with 3.1 and over
    – Ultimation
    Nov 17, 2014 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.