Open cmer opened 7 years ago
I found a workaround to this problem if anybody ever runs into the same issue.
I simply added gem 'json'
to my Gemfile. I still have no idea what really causes the issue, however.
I found that I had multiple versions of json
installed. After I uninstalled them both this stopped happening:
$ gem uninstall json
Select gem to uninstall:
1. json-1.8.6
2. json-2.0.3
3. All versions
> 3
Successfully uninstalled json-1.8.6
Successfully uninstalled json-2.0.3
I'm an iOS dev, quite new to Ruby, so I'm not 100% on why this error is happening. From looking around the web it seems that json
was being loaded twice somehow? But I don't really get why removing it completely doesn't cause an error too. ¯_(ツ)_/¯
If I can help debug, let me know :)
Uninstalling non-bundled versions of json
is working work-around, but they're installing again by bundle update
(because newer versions of json
than bundled are available).
I've started avoiding ever doing a bundle update
because of dependency issues. If you uninstall previous versions as described above, only install one version of the JSON gem, and add it to the Gemfile, the VERSION error goes away.
Whenever I run my specs in Guard, I get a bunch of "constant already initialized" errors for
json
. When I run my specs directly in the terminal, I don't get this. Any idea what could be going on? I like at the Guard and Guard-Rspec code but I couldn't find anything obvious.Thanks