I'm using ruby on rails and I keep getting this error when using Rake commands. I tried to figure it out by googling and saw some stuff on updating rake or rspec versions causing problems. I tried but it didn't work and I'm not sure why I keep getting the error.
ruby version ruby 2.3.0p0
rails version Rails 4.2.6
rspec-rails 3.0
I tried specifying in the gemfile:
gem 'rspec-rails', '~> 3.4.4'
and
gem 'rspec-rails', '~> 3.3.0'
and after each one I did
bundle update
bundle install
and neither worked.
I ended up just removing the version part at the end:
gem 'rspec-rails'
And then did bundle update and it worked. My terminal showed:
Using rspec-rails 3.4.2
wspurgin's comment is the best answer. I tried doing
bundle update rspec
and
bundle update rspec-rails
and also
bundle update rspec-core
to no avail (ie. it did not get a newer version of the gems). When I tried specifying the required version 3.4.4 (according to google searches) of rspec-core I got
rspec-core (~> 3.4.4)
rspec-rails was resolved to 3.3.3, which depends on rspec-core (~> 3.3.0)
Therefore by updating rspec and rspec-rails together
bundle update rspec rspec-rails
It does the trick and gets the new versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With