Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys! So I was trying to execute a very simple ruby file that I saved in my user folder (by default) and I tried to execute it from Terminal (I am on the Yosemite version). After entering:

#!/usr/bin/env ruby
(then dragged the file to Terminal)

it gives me this:
-bash: (file) Permission denied

I have been looking that on the Internet and they said that I should unlock Root, I did so already but it still returns me the same denial.

I am very new in this things and would love to get some help! :)

Thanks!
Posted
Comments
Sergey Alexandrovich Kryukov 4-Apr-15 17:30pm    
Dragging file to terminal... well, well... Did you use sudo?
—SA
awacate 4-Apr-15 17:41pm    
Sudo what for?

(Haha I try to get used to typing everything, but whenever I have issues I just drag to be sure)
Sergey Alexandrovich Kryukov 4-Apr-15 18:25pm    
For everything. Do you know what sudo is and how it is used? If not, please read about it.
—SA
Sergey Alexandrovich Kryukov 4-Apr-15 18:58pm    
Dragging cannot make your sure, just the opposite. You cannot do nearly anything with that. Everything is done by typing and text editing.
—SA
awacate 5-Apr-15 3:43am    
You're absolutely right, just learnt the correct ways to get into the folders without dragging the files. Thanks! I think it works now :) (Yes I am aware of the sudo commands)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900