Gemfile.lock write error, permissions?
Your app root directory (whose permissions govern file creation) and files are all owned by root instead of your user (possibly because you did sudo rails new
—don’t use sudo
for that). You can change the permissions by doing:
sudo chown -R $(whoami):$(whoami) myappfolder
Where “myappfolder” is your Rails app’s root directory.
By the way, a good tip with regard to sudo
is to always try the command without it first, then, if there’s a permissions error when it runs, you may need sudo
. Don’t default to using sudo
.