TheOdinProject / ruby-exercises

MIT License
219 stars 1.06k forks source link

Bug - Could not locate Gemfile or .bundle/ directory #83

Open Salomanuel opened 1 year ago

Salomanuel commented 1 year ago

Complete the following REQUIRED checkboxes:

The following checkbox is OPTIONAL:


1. Description of the Bug:

I'm aware of this discussion: Debugging exercises with bundle exec commands #72 and this pull request: Provide instructions to install and use RSpec globally #80

So I can see why the decision of removing the Gemfile has been done. I do have experience with Rails, but it's been a while since I've used Ruby on its own. Maybe there is a way to make Rspec run without a Gemfile, but I'm struggling to find how. And apparently, I'm not the only one: https://stackoverflow.com/questions/12307097/how-to-use-rspec-without-rails

2. How To Reproduce:

Following the instructions this happens:

❯ gem install rspec
Successfully installed rspec-3.12.0
Parsing documentation for rspec-3.12.0
Done installing documentation for rspec after 0 seconds
1 gem installed
❯ rspec
Could not locate Gemfile or .bundle/ directory

3. Expected Behavior:

❯ git checkout e365f82 (note from Salomanuel - that commit is * / e365f82 - Fri, 21 Oct 2022 21:25:56 -0500 (4 months ago) PR Template: Flip order of checklist and details (#79))
You are in 'detached HEAD' state. blablabla
❯ bundle install
blablabla
Bundle complete! 1 Gemfile dependency, 7 gems now installed.
❯ rspec
blablabla
Finished in 0.03875 seconds (files took 0.13611 seconds to load)
32 examples, 2 failures, 28 pending

4. Desktop/Device:

❯ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
❯ gem install rspec
Successfully installed rspec-3.12.0

OS: Ubuntu 20.04.5 LTS on Windows 10 x86_64
Shell: zsh 5.8

5. Additional Information:

CouchofTomato commented 1 year ago

Hey @Salomanuel

Are you in the correct directory when running the rspec command? Rspec is not a rails plugin and doesn't need rails.