RiotGamesCookbooks / rbenv-cookbook

Installs and configures rbenv
http://community.opscode.com/cookbooks/rbenv
Apache License 2.0
137 stars 109 forks source link

Can't install gem by rbenv_gem resource #114

Open ironsand opened 10 years ago

ironsand commented 10 years ago

I tried to install moji gem by this code:

rbenv_gem "moji" do
  ruby_version "2.0.0-p451"
end

If the gem is already installed, there were no error.

I uninstalled the moji gem directly by server and run the cookbook again, then got this error:

---- Begin output of /usr/local/rbenv/versions/2.0.0-p451/bin/gem install moji -q --no-rdoc --no-ri  -v "1.6"  ----
STDOUT: 
STDERR: ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - /root/.gem/ruby/2.0.0/cache/moji-1.6.gem
---- End output of /usr/local/rbenv/versions/2.0.0-p451/bin/gem install moji -q --no-rdoc --no-ri  -v "1.6"  ----

I'm using /usr/local for install_prefx. All gem files are in a directory /usr/local/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/cache/ .

How can I install gems by rbenv_gem resource? Am I doing something wrong?