Error when running bundle exec rspec

All of a sudden when I run ‘bundle exec rspec’ i get:

~/3b6a1428-my_name-rspec-2 (master)$ bundle exec rspec
Could not find byebug-9.0.6 in any of the sources
Run `bundle install` to install missing gems.

I ran ‘bundle install’ (again) and it says:

~/3b6a1428-my_name-rspec-2 (master)$ bundle install
Using byebug 9.0.6
Using diff-lcs 1.3
Using rspec-support 3.2.2
Using bundler 1.14.6
Using rspec-core 3.2.3
Using rspec-expectations 3.2.1
Using rspec-mocks 3.2.1
Using rspec 3.2.0
Bundle complete! 2 Gemfile dependencies, 8 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

but I still get the same error after running ‘bundle exec rspec’

Please note, I have already forked and completed RSPEC Practice problems 1 with no problems (and used byebug), and am halfway through the second set of problems when all of a sudden this happened?! What went wrong and how do I fix it??

Hello there!
Here is a few steps that I would do:

  1. run " bundle env ", and check the Gem file to see whether they have byebug. If no, just add " gem ‘byebug’ " to the Gem file
  2. kill the ruby process. On your terminal: " killall -9 ruby " and hit enter
  3. make sure that you have " require ‘byebug’ " on top of your .rb files
  4. any “.rb” files that are unsave, or in the process of changing, save them by “Command + S”
  5. run " bundle update ", and run " bundle install " again
  6. run “bundle exec rspec -c”

Let me know if it occurs again.

Hi Thai,
Thank you for getting back to me. I did everything you asked but unfortunately I am still having the same problem. I really want to get this resolved! Here is from where I updated, let me know if I should copy and paste from further back…

~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle update
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Using byebug 9.0.6
Using diff-lcs 1.3
Using rspec-support 3.2.2
Using bundler 1.14.6
Using rspec-core 3.2.3
Using rspec-expectations 3.2.1
Using rspec-mocks 3.2.1
Using rspec 3.2.0
Bundle updated!
~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle install
Using byebug 9.0.6
Using diff-lcs 1.3
Using rspec-support 3.2.2
Using bundler 1.14.6
Using rspec-core 3.2.3
Using rspec-expectations 3.2.1
Using rspec-mocks 3.2.1
Using rspec 3.2.0
Bundle complete! 2 Gemfile dependencies, 8 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle exec rspec -c
Could not find rspec-support-3.2.2 in any of the sources
Run `bundle install` to install missing gems.
~/3b6a1428-brittanyzellman-rspec-2 (master)$ 

A couple days ago I tried going through the environment setup again and after doing that I get the exact same problem but with a different Gem. Before it was Byebug and now it’s rspec-support. I’ve checked the path to it and it’s the same as all the other Gems. I’ve lost four days to this am I am really eager to get back to work! Thanks again for your response, any further help is GREATLY appreciated!!

You’re welcome!

The error says that you need to install missing gems, and rspec-support is missing
run “gem install -v ‘3.2.2’ rspec-support” , then " bundle exec rspec -c "

If still missing.
Then let’s uninstall rspec and install it again.
run " gem install bundler ",
run " gem uninstall rspec " ,
run “gem install rspec -v 3.2.0”,
run " gem install -v ‘3.2.2’ rspec-support "
then run “bundle exec rspec -c”

[Remember to run in the folder (rspec-2) that has a gem file. If you can’t run the command with gem, then run it with sudo]

Let me know how things go for you.

1 Like

Hi Thai,
Wow, I can’t believe this is finally settled! Thank you!
Although, it wasn’t as smooth as installing the one gem. After I installed one, I got an error for the next one and had to reinstall every single one of them individually:

~/3b6a1428-brittanyzellman-rspec-2 (master)$ gem install -v '3.2.2' rspec-support
Fetching: rspec-support-3.2.2.gem (100%)
Successfully installed rspec-support-3.2.2
1 gem installed
~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle exec rspec -c
Could not find rspec-core-3.2.3 in any of the sources
Run `bundle install` to install missing gems.
~/3b6a1428-brittanyzellman-rspec-2 (master)$ gem install -v '3.2.3' rspec-core

Fetching: rspec-core-3.2.3.gem (100%)
Successfully installed rspec-core-3.2.3
1 gem installed
~/3b6a1428-brittanyzellman-rspec-2 (master)$ 
~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle exec rspec -c
Could not find rspec-expectations-3.2.1 in any of the sources
Run `bundle install` to install missing gems.
~/3b6a1428-brittanyzellman-rspec-2 (master)$ gem install -v '3.2.1' rspec-expectations
Fetching: rspec-expectations-3.2.1.gem (100%)
Successfully installed rspec-expectations-3.2.1
1 gem installed
~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle exec rspec -c
Could not find rspec-mocks-3.2.1 in any of the sources
Run `bundle install` to install missing gems.
~/3b6a1428-brittanyzellman-rspec-2 (master)$ gem install -v '3.2.1' rspec-mocks
Fetching: rspec-mocks-3.2.1.gem (100%)
Successfully installed rspec-mocks-3.2.1
1 gem installed
~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle exec rspec -c
Could not find rspec-3.2.0 in any of the sources
Run `bundle install` to install missing gems.
~/3b6a1428-brittanyzellman-rspec-2 (master)$ gem install -v '3.2.0' rspec
Fetching: rspec-3.2.0.gem (100%)
Successfully installed rspec-3.2.0
1 gem installed
~/3b6a1428-brittanyzellman-rspec-2 (master)$ bundle exec rspec -c

Do you know why ‘bundle install’, ‘bundle update’, or why installing one made another disappear? What can I do do avoid this in the future? I can’t be unable to work on this material for a stretch like this again or I’m afraid I won’t complete it in time. Thanks you again for helping me figure this out!
Brittany

I can’t tell since I don’t know what machine type you have.
From my experience with bundle, I used to have ruby and bundle in my mac, updated to OSX El capitan, install the dotfile. Then, when I run bundle, it wouldn’t let me install some of the gems.
The problem is my machine did not allow the “dotfile” to install some programs (or halt during the process of installation).
So I looked it up and found a solution: --> link

Good luck and let me know if anything I can help.

1 Like