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 Installation Error: "You don't have write permissions"

I have been trying to install ruby on rails for last 5 hours. Getting following error:

"You don't have write permissions" into the /Library/Ruby/Gems/1.8 directory

In the process of fixing the issue installed git application, XCode, Command line tools, but no use.

I think the issue is with $PATH and system version of Ruby but not able to solve it!

Please help solve this problem.

Current installations include:

LM-SJN-00872139:~ shnarayan$ brew -v Homebrew 0.9.5

LM-SJN-00872139:~ shnarayan$ ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

LM-SJN-00872139:~ shnarayan$ gem -v 2.1.4

LM-SJN-00872139:~ shnarayan$ $PATH -sh: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin: No such file or directory

Error: LM-SJN-00872139:~ shnarayan$ rails -v Rails is not currently installed on this system. To get the latest version, simply type: $ sudo gem install rails You can then rerun your "rails" command.