Cyclic dependencies json_pure / rubygems
I have a problem trying to configure rvm where gems cannot be installed due to json_pure dependency. I tried to set json_pure but rubygems itself seems to depend on json_pure. I tried to remove all versions of json_pure, but rubygems still complains.
$ sudo gem install json_pure /Library/Ruby/Site/1.8/rubygems.rb:777:in `report_activate_error ': Could not find RubyGem json_pure (> = 0) (Gem :: LoadError)
I tried to download gem and install it locally but rubygems still complains about dependency.
a source to share
I had this exact problem and the above solutions did not work for me. (I am not using rvm, and reinstalling RubyGems did not solve the problem.)
This is what I did to fix my installation on my Mac. (Ruby 1.8.6, Mac OS X 10.5.8)
1) Go to http://rubygems.org/gems/json_pure
2) Download the json_pure gem in ~ / Downloads
3) cd ~/Downloads/
4) sudo gem install json_pure-1.4.6.gem
(You will still see the error "Could not find RubyGem json_pure", but the installation does work. To double check, you can redo " sudo gem install json_pure-1.4.6.gem
" and you should not see the error a second time.)
5) Make sure json_pure is now set:
gem list
a source to share
I fixed this issue by copying the json and json_pure gems and their specifications from the ruby ββworking directory to the .rvm directory of the broken ruby ββgem. Not sure why Rubygems themselves rely on another stone.
cp -r ~ / .rvm / gems / ruby-1.8.7-p249 / gems / json * ~ / .rvm / gems / ruby-1.8.6-p399 / gems / cp -r ~ / .rvm / gems / ruby-1.8.7-p249 / specifications / json * ~ / .rvm / gems / ruby-1.8.6-p399 / specifications /
a source to share
I can't figure out if you're having a problem installing RVM or using RVM. If you need to install RVM, don't use sudo.
Just enter
$ gem install rvm
RubyGems will install it in your home directory. Then follow rvm-install
and follow the instructions.
When using RVM, never usesudo
.
a source to share
This issue came up when I removed all json-pure versions in my main $ PATH. To fix the problem, I reloaded RubyGems 1.3.7 from source and was able to reinstall the json-pure gem. Note. I have not used RVM.
Steps:
1) Download RubyGem 1.3.7.tgz
2) Use these commands on the command line
tar xzvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo /opt/local/bin/ruby setup.rb
3) Try the gem command
gem list
4) If that works, install the json-pure gem //, you might need to install the json gem as well
sudo gem install json
sudo gem install json-pure
a source to share