[ACCEPTED]-Can't install JSON gem-bundler
After checking logs by running $ heroku 5 logs
I found "An error occurred while installing 4 json (1.4.6), and Bundler cannot continue.
Make 3 sure that gem install json -v '1.4.6'
succeeds before bundling."
I then 2 removed 2 json entries from the Gemfile.lock 1 and had no further issues.
Why did you run gem install json
at all? Bundler takes care 16 of that for you and will ensure that the 15 correct version of each gem is installed 14 (since sometimes dependencies require an 13 older version). Run
gem uninstall json
bundle install
Also ensure you have 12 source 'https://rubygems.org'
at the top of your Gemfile.
As for the permissions 11 info, you may have to run gem
and bundle
commands 10 with sudo
.
By the way, I highly recommend taking a 9 look at and using RVM, particularly the gemsets feature. It 8 will make your life infinitely better when 7 developing Ruby apps. If you decide to do 6 so, I'd also suggest trashing all the gems 5 you've install using the system Ruby by 4 running sudo rm -rf /Library/Ruby/Gems/1.8/
. It's also important that when 3 using RVM you don't have to use sudo
when running 2 gem
(or bundle
), which is not only safer but less 1 typing too.
Please update your rubygems by executing 4 the following command..
gem update --system
may be it will solve 3 the problem. After updating your gem. Then 2 run the following command to install json
gem install json
Now 1 you can get json gem installed in your system.
Try: $ sudo apt-get install ruby1.8-dev
0
If you're using rbenv, try rbenv rehash
0
I had this problem when trying to build 5 a website with Jekyll.
Turned out I hadn't 4 followed all the instructions at https://jekyllrb.com/docs/installation/ubuntu/
I don't 3 know if it was the missing packages or commands 2 into ~/.bashrc but it fixed the problem 1 in two instances of Ubuntu in WSL
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.