Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

Get Permission Denied When Creating Odot rails app in project directory?

I have ssh into the virtual machine and here is the error message I am getting:

/home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': Permission denied - /home/treehouse/projects/odot (Errno::EACCES)

I configured the virtual machine accordingly to the "Ruby Enviornment" videos updating the latest versions of virtual box and vagrant and Team Treehouse files? Not sure what I'm doing run as it should create a new rails application with that command. Does anyone have a solution to this?

Thanks

7 Answers

Robert Goddard
Robert Goddard
15,019 Points

You could try changing the permissions on the directory "odot." I'm not sure what the exact configuration is but you could try something like:

sudo chmod 777 /home/treehouse/projects/odot

You'll have to have the current user's password; and the current user must be a sudoer.

Hey Robert,

Thanks for the help. I tried this and it told me that either the directory doesn't exits or that the 'mkdir: cannot create directory 'the directory name': Permission denied. I am ssh into the Vagrant virtual machine. I'm not sure how this would matter seeing as how it updates to your home directory on your computer anyways. Does anyone have any ideas?

Thanks

Robert Goddard
Robert Goddard
15,019 Points

Lemme download it and set it up and give it a shot.

In the mean time, can you send me a screenshot of your ssh term?

Also try: sudo chmod 777 /home/treehouse/projects/

Robert Goddard
Robert Goddard
15,019 Points

Man, I don't know, I was able to "vagrant ssh".

cd projects

Then I typed rails new Odot and it worked fine.

Maybe try deleting the vagrant file and project file and try again fresh?

Hey Robert,

Thanks. I am little bit confused on how to do this as I am not use to vagrant. What command do you run and do you have to reinstall Vagrant from the site or can you just create a new Ubuntu disc based on Virtual Box.

Thanks

Robert Goddard
Robert Goddard
15,019 Points

Just redownload the file in the video, unzip it. cd into the directory where you unzipped it, and type "vagrant up"

Robert, dude you the fucking man. Tech 101, when something isn't working either restart it, reboot it, or delete and reinstall. LOL.