Clean Install Osx 10.9.1 Returns "Undefined Method 'Path2Class'" When Trying to Install Gems

Clean install OSX 10.9.1 returns undefined method `path2class' when trying to install gems

It turns out that this is a bug in an older version of psych, but it can't be solved, as long as you installed ruby with RVMs statically linked gems. So basically the problem is related to RVMs statically linked gems. Installing rubies with the --disable-binary solves the problem:

rvm install 2.0.0-p353 --disable-binary

Or reinstall with:

rvm reinstall 2.0.0-p353 --disable-binary

Install RVM properly, keeps asking for password when installing gems

It looks like your RVM and Rubygems environments are set up OK. The problem is most likely that you installed something using sudo at some point, which now has left traces of itself in your RVM installation.

To fix this is pretty easy and shouldn't affect anything else on your machine. Run this from the command-line:

sudo chown -R tjobbeandrews:staff ~/.rvm

Here's what it does:

  • sudo escalates your privileges to "root", allowing you to change things currently owned by "root".
  • chown -R tjobbeandrews:staff ~/.rvm tells the system to change ownership and group of all files in the ~/.rvm directory, which is where RVM stores everything, back to you and what should be your default group.

Be VERY careful following instructions you find on the internet, especially when they ask you to do anything as "root" or using sudo. Making changes as root can crash your system in a second, can open the door for infections/viruses, or cause lasting problems that make your life miserable simply because the author wrote it years ago and things have changed since then.

"The internet never forgets" is true, and it's a vast garbage-pit of knowledge that can go stale within days. It's up to you to educate yourself about what is safe, and how to safely install things, and, even more important, know how to recover from the changes you do based on someone else's say-so, so walk carefully padawan.



Related Topics



Leave a reply



Submit