Gemfile.lock`. It is likely that you need to grant write permissions for that path.

C
sudo chown -R $(whoami):$(whoami) myappfolder
Source

Also in C: