Closed Sdcrouse closed 5 years ago
Thank you for spotting this issue and providing feedback.
We have updated the materials and believe your issue to have been resolved.
We apologize for any frustration you might have encountered during this process but thank you for helping us ensure that those who follow in your path will not encounter the same problems that you faced.
If you do not believe that this issue has been addressed, please re-open this issue. 💙
Hi. First of all, this problem doesn't occur in the in-browser IDE. It only occurs in a local environment (VSCode, in my case).
TL;DR: In the Gemfile,
gem 'database_cleaner', git: 'https://github.com/bmabey/database_cleaner.git'
should begem 'database_cleaner'
.Currently, there's a gem in the Gemfile that looks like this:
gem 'database_cleaner', git: 'https://github.com/bmabey/database_cleaner.git'
However, when I ran one of the tests (again, from a local environment, not the in-browser IDE), I got this output:
The error occurred at this line of code in the spec_helper.rb file:
DatabaseCleaner.strategy = :truncation
After some trial and error, I discovered that the previous lab (Sinatra Complex Forms Associations) also had a "database_cleaner" gem. However, that lab worked just fine in my local environment. That's because its Gemfile had this line of code:
gem 'database_cleaner'
.I went back to the Sinatra Playlister lab and replaced
gem 'database_cleaner', git: 'https://github.com/bmabey/database_cleaner.git'
withgem 'database_cleaner'
. The tests then worked just fine in my local environment.I think that's all that needs to be done to fix the issue; there must be something wrong with the repo at https://github.com/bmabey/database_cleaner.git, or else with the way that it's referenced in the Gemfile.
I would really appreciate it if someone looked further into this; it caused me quite the headache for a while.
--- Sdcrouse