There was an error while trying to write to Gemfile.lock. It is likely that you need to allow write permissions for the file at path: code example
Example: Gemfile.lock`. It is likely that you need to grant write permissions for that path.
sudo chown -R $(whoami):$(whoami) myappfolder