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

Melanie Kim
Melanie Kim
3,745 Points

Can't set up gem. I followed video step by step. Not sure what I'm doing wrong. This is what I get:

  • To start using RVM you need to run source /Users/[my_name]/.rvm/scripts/rvm in all your open shell windows, in rare cases you need to reopen all shell windows.

gem install rails --version 5.0.0 ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Melanie,

Sometimes, when you don't have 'permissions' you can use the sudo command ("Super User Do...). This is a more advanced usage in the console, so, please be really careful when and where you use it. For the command you are trying to run, it'll be fine. Just do

sudo gem install rails

When you hit enter on this command, it will prompt you for your password. This is just your system password that you use to log in. When you type it into the console, you will not see anything happening, but don't worry, it is getting entered. After you password, hit enter and it should install okay for you.

Keep Coding! :) :dizzy: