Ruby on rails 在MacOS终端中运行捆绑包安装时出现问题
运行Ruby on rails 在MacOS终端中运行捆绑包安装时出现问题,ruby-on-rails,rubygems,Ruby On Rails,Rubygems,运行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. 我使用的是
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.
我使用的是Ruby 2.3.3版,使用的平台是x86\u 64-darwin18。
他们对如何修复这个错误有什么建议吗
我已经尝试解锁该文件,但它说该文件无法解锁,只能为我提供制作副本的机会。你能试试吗
1) chown-R USERNAME/Users/my user/.bundle/cache/compact\u index/
2) sudo捆绑包安装
3) bundle exec bundle安装
4) 只需授予chown-R USERNAME/Users/my user/.bundle/cache/
5) rm-rf/Users/my user/.bundle/cache
将用户名替换为系统用户名在运行该命令,然后再次尝试进行
捆绑安装
后,我得到了相同的结果error@peopleplusme请尝试sudo bundle安装
或bundle exec bundle安装
,好吗,否则只需授予chown-R USERNAME/Users/my user/.bundle/cache/
或rm-rf/Users/my user/.bundle/cache/