dtao / safe_yaml

Parse YAML safely
MIT License
217 stars 63 forks source link

(Gem::DependencyError) Unable to resolve dependencies: jekyll requires safe_yaml (~> 0.7.0) #41

Closed nikenhn closed 11 years ago

nikenhn commented 11 years ago

I have post my problem here: https://github.com/mojombo/jekyll/issues/1259. Please help me on this.

I got the error when install jekyll on ubuntu server 12.04.

The message is: Unable to resolve dependencies: jekyll requires safe_yaml (~> 0.7.0).

I have install safe_yaml by $sudo gem install safa_yaml but the error still there and I cant get Jekyll to work. Anyone here know how to solve this problem???

dtao commented 11 years ago

The latest version of safe_yaml is 0.9.3, so when you run sudo gem install safe_yaml that's the version RubyGems will install for you.

If Jekyll has specified a dependency on safe_yaml ~> 0.7.0, that means it wants the minor version to be 7 (so, anything from 0.7.0 to 0.7.9).

Try this:

sudo gem install safe_yaml -v=0.7.0

That said, you should be aware that hand-installing gems like this is error-prone and not the way most Ruby devs do things these days. Read up on Bundler, which is a dependency management system that takes care of all this for you.

nikenhn commented 11 years ago

Hi @dtao , here's what I tried.

screen shot 2013-07-04 at 12 33 55 am

Thanks for the link to Bundler. I'm going to try then.

dtao commented 11 years ago

That is very strange! I just tried it myself and it installed just fine. Are you maybe connecting to a different gem server, other than RubyGems?

nikenhn commented 11 years ago

I don't know. How to know what gem server am I connecting to?

dtao commented 11 years ago

Try this:

gem sources

If you see https://rubygems.org listed there, try actually pinging it to make sure your connection is OK. Also check your gem version:

gem -v

For reference, my version is 2.0.3.

It's possible your version is really old, though that wouldn't be a direct cause of the problem. But you could try upgrading to see if it helps anyway:

gem update --system
nikenhn commented 11 years ago

Thank you very much. Seems I found it. Problems is I lost the connection with gem server ritght?

screen shot 2013-07-04 at 1 56 39 am

But there're still a question: how to upgrade gem version on ubuntu? I typed gem update --system and got the error as above. I've run apt-get update & apt-get upgrade already.

mkristian commented 11 years ago

add the following ppa and you will get a newer version of rubygems

https://launchpad.net/~brightbox/+archive/ruby-ng

the brightbox people maintain the debian packages for passenger/mod_ruby.

-christian

On Wed, Jul 3, 2013 at 8:02 PM, xabeng notifications@github.com wrote:

Thank you very much. Seems I found it. Problems is I lost the connection with gem server ritght?

[image: screen shot 2013-07-04 at 1 56 39 am]https://f.cloud.github.com/assets/2520187/745412/82fe059e-e412-11e2-8290-0f59ded3a301.png

But there're still a question: how to upgrade gem version on ubuntu? I typed gem update --system and got the error as above. I've run apt-get update & apt-get upgrade already.

— Reply to this email directly or view it on GitHubhttps://github.com/dtao/safe_yaml/issues/41#issuecomment-20437959 .

nikenhn commented 11 years ago

Thank you very much everyone! I've found the solution. Here: https://github.com/joshfng/railsready