运行bundle install
时出现错误
There was an error while trying to write to
'/Users/my-user/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions'.
It is likely that you need to grant write permissions for that path.
我正在使用平台x86_64-darwin18
的Ruby 2.3.3版本。
他们对如何解决此错误有任何建议吗?
我已经尝试过解锁文件,但是它说无法解锁文件,而只是给我提供了复制副本的机会。
答案 0 :(得分:1)
您可以尝试
1)chown -R USERNAME /Users/my-user/.bundle/cache/compact_index/
2)sudo bundle install
3)bundle exec bundle install
4)只需授予chown -R USERNAME /Users/my-user/.bundle/cache/
5)rm -rf /Users/my-user/.bundle/cache
用您的系统用户名替换USERNAME