I am trying to install Compass and Jekyll, but the gem commands fail:
$ gem update
/usr/lib/ruby/1.9.1/psych.rb:154:in `parse': (<unknown>): couldn't parse YAML at line 2 column 0 (Psych::SyntaxError)
From googling, I see that Ruby has updated it's YAML parser and that gems need to update their config/boot.rb
file, but that doesn't help me unless I fork every gem that I install.
Here is my .gemrc, it is the only place where I could have screwed something up:
gemhome: /home/dan/.gems
gempath:
- /home/dan/.gems
Ruby version: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
, installed using apt-get on Ubuntu.
What do I have to do to start installing ruby gems? I know almost nothing about ruby, I just want to install some software that is distributed as gems.
update
Looking at my question, I see that the ruby version in the error message and ruby --version
are different. How do the ruby command and the gem command decide which version to use? Does it matter that they are different? update: I now have only ruby 1.9.3. The problem must be with my .gemrc
update
Removing my .gemrc and installing as root works. What is wrong with my .gemrc?