2

I have install rbev

rbenv version
2.0.0-p247 (set by /Users/amritdeepdhungana/.rbenv/version)

, ruby

ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]\

and rails

rails -v
Rails 4.0.1

I have create new project and bundle it. But I get this problem

Installing rake (10.1.1)
Errno::EACCES: Permission denied - /Library/Ruby/Gems/2.0.0/build_info/rake-10.1.1.info
An error occurred while installing rake (10.1.1), and Bundler cannot continue.
Make sure that `gem install rake -v '10.1.1'` succeeds before bundling.

After that, I have install rake gem but again I got error

gem install rake -v '10.1.1'
ERROR:  Could not find a valid gem 'rake' (= 10.1.1), here is why:
          Unable to download data from https://rubygems.org/ - too many connection resets (https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)
ERROR:  Possible alternatives: rake

How can I set the permission while install any gem package ?

4

2 回答 2

0

几乎看起来您没有正确设置 PATH,但您对 Nick Veys 问题的回答看起来不像。我猜你还没有安装任何红宝石rbenvrbenv versions看起来像什么?

于 2015-03-23T09:55:20.523 回答
0

就像@bjhaid 所说,您正在尝试将这些 gem 安装到您的系统 Ruby 中。

/Library/Ruby/Gems/2.0.0/build_info/rake-10.1.1.info

Ruby 2.0.0p247 与 Mavericks 捆绑在一起。具体来说:

$ /usr/bin/ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

我的自建(rvm)版本的版本字符串略有不同:

$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]

要找出实际使用的是哪个 ruby​​,请尝试which ruby. 确保您已正确安装 rbenv,并安装了新的本地 Ruby。

于 2014-01-24T20:55:46.487 回答