我使用的是 OS X 10.8、XCode 4.4、Ruby 1.9.3 和 Rails 3.2。
当我从 git 克隆我的 Rails 项目并运行时:
bundle install
I get:
安装 json (1.7.4)
Errno::EPERM:不允许操作 - /Users/myuser/.rvm/gems/ruby-1.9.3-p0/gems/json-1.7.4/.gitignore
安装 json (1.7.4) 时出错,Bundler 无法继续。
确保gem install json -v '1.7.4'
捆绑之前成功。
然后我尝试:
gem install json -v '1.7.4'
and get:
错误:执行 gem 时... (Errno::EPERM)
不允许操作 - /Users/scalessec/.rvm/gems/ruby-1.9.3-p0/gems/json-1.7.4/.gitignore
好的。权限问题吧?咱们试试吧:
sudo gem install json -v '1.7.4'
不去。这是我得到的:
构建本机扩展。这可能需要一段时间...
错误:安装 json 时出错:
错误:无法构建 gem 本机扩展。
/Users/myuser/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
创建Makefile
制作
编译生成器.c
make: /usr/bin/gcc-4.2: 权限被拒绝
制作:*[生成器.o] 错误 1
有没有搞错?
我不确定,但两天前我升级到了 OS X 10.8(从 Lion 升级到了,我的 Rails 配置运行良好)。我也遇到了同样的 JSON 1.7.4 问题。
最终,我通过注意到 Xcode 的命令行工具没有安装(但它们在 OS X 10.7 上!)解决了这个问题。我刚刚在 Xcode 中重新安装了 CLI 工具JSON 1.7.4 问题消失了。
另外,为了以防万一它有帮助,请查看本指南:https://thoughtbot.com/blog/the-hitchhikers-guide-to-riding-a-mountain-lion https://thoughtbot.com/blog/the-hitchhikers-guide-to-riding-a-mountain-lion
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)