简体   繁体   中英

I am getting a Gem:LoadError: in the terminal, can someone help me find the source?

I am attempting to run sudo sh in the terminal. However, I keep getting this error

[2014-08-11T10:05:37-04:00] FATAL: Gem::LoadError: Unable to activate httparty-0.13.1, 
because json-1.5.4 conflicts with json (~> 1.8)

I have no idea what it means. Can someone help me out?

FATAL: Gem::LoadError: Unable to activate httparty-0.13.1, 
because json-1.5.4 conflicts with json (~> 1.8)

This means you do have json-1.5.4 installed on machine. But httparty-0.13.1 require json 1.8.0 . try update json gem. it will solve your issue.

But do insure dependency of other gem on json-1.5.4 before update json gem

Try update your json gem to 1.8.x . HTTParty gem requires a json version of ~> 1.8 link . Or downgrade to a HTTParty version that meet with your json gem version.

It's a ruby error. Looks like you have a script set up attached to your (I assume bourne) shell. You need to find that script. I'm no expert but check /etc/profile

http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_01.html

The actual error is when whatever is running is run it uses the ruby gem: httparty-0.13.1 (think library) which requires the gem json 1.8 (there or abouts) but what you have installed is the gem json 1.5.4

If you wanted to fix it you should first look to where you are using json 1.5.4, figure out why it's set to 1.5 ish, and if it breaks anything else. If not I'd upgrade it, with whatever gem management system you're using.

The thing that's odd is that this doesn't sound like you've set up the box, if you knew anything of ruby it'd be obvious. Either someone else maintains it, or you've inherited it, if the former - get them to fix it, if the latter, there are things going on you've no idea about, which is concerning. I'd flatten an undocumented box ;-)

您需要删除unistall gem json不同版本。.使用unistall gem json ,然后它将询问要卸载哪个...这是需要解决的冲突。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM