Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Laura Cressman
Laura Cressman
12,548 Points

Installing Rails error :(

Hi friends, I am trying to install Rails, amongst other gems, but cannot seem to get past this error in my console. It looks the same every time. Here it is, after trying to install bundler. Thank you in advance, any help is appreciated! Smile more, Laura :)

Lauras-MacBook-Pro:~ lauracressman$ gem install bundler ERROR: Error installing bundler: invalid gem: package is corrupt, exception while verifying: undefined method `path2class' for #<Psych::ClassLoader:0x007fdeda1b6de8> (NoMethodError) in /Users/lauracressman/.rvm/gems/ruby-2.0.0-p481/cache/bundler-1.6.3.gem

1 Answer

It seems that the error your are having is related to Psych. The version of psych that I have installed is 2.0.5 on my Mac. I am running that with ruby 2.1.2p95. I am not having any issues with my ruby install. You might try either updating psych or ruby or both.

To see which version of Psych you are running use this command

gem list --local |grep psych

you can uninstall psych by using this command

gem uninstall psych -v 'your version'

Hope this gets you on the right track. Let me know if you need additional help.

Laura Cressman
Laura Cressman
12,548 Points

I just updated my ruby, instead of using 2.0.0, I used 2.1.2 like you did, and was able to install rails! I didn't use psych though. As long as the new Ruby and Rails 4.1 aren't terribly different, I hope that I can still follow along. Thanks Gary!! :)