在 Ubuntu 12.10 中安装 rvm 和 bundle:Errno::EACCES [英] rvm and bundle install in Ubuntu 12.10: Errno::EACCES

查看:42
本文介绍了在 Ubuntu 12.10 中安装 rvm 和 bundle:Errno::EACCES的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望你能帮助我.我正在用 ruby​​、rails 和所有东西安装 rvm,我以前已经做过很多次了,通常是按照这个好的教程http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

一切似乎都很好,但是当我尝试运行我的 bundle install 时收到了这条消息(实际上整个下午都在工作):

ERROR: Gem bundler 没有安装,先运行 `gem install bundler`.

如果我按照它说的去做,我会得到:

错误:执行 gem 时 ... (Errno::EACCES)权限被拒绝 -/var/lib/gems

有什么建议吗?

PS:我还注意到,当我安装 ruby​​ 时,我收到如下消息:

没有二进制红宝石可用于:ubuntu/12.10/x86_64/ruby-1.9.3-p286.

PPS:

的结果

which [gem|ruby|rails]

指向 usr/bin/ruby.我注意到的是,如果我这样做

<预><代码>.~/.bash_profile

然后哪个 gem 指向我的家,我可以捆绑安装.如果我重新启动,我必须这样做.再次 ~/.bash_profile...

解决方案

来自教程:

<块引用>

在任何情况下,您都不应安装 Ruby、Rubygems 或任何来自 apt-get 的 Ruby 相关包.该系统已过时并导致到严重的头痛.对于 Ruby 相关的包,请避免使用它.我们做 Ruby,我们知道什么是最好的.相信我们.

因此,首先,在包管理器中查找所有相关包(ruby、rubygems,甚至 rvm)并确保它们被完全删除,然后再次尝试学习教程.

如果一切正常,which [gem|ruby|rails] 应该都指向您的主文件夹中的文件,而不是其他任何地方.

hope you can help me. i'm installing rvm with ruby, rails and the whole lot, and I've done it many times before, usually following this good tutorial http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

Everything seems to be fine, but I get this message when I try to run my bundle install (it's been working all afternoon actually):

ERROR: Gem bundler is not installed, run `gem install bundler` first.

If I then do as it says, I get:

ERROR:  While executing gem ... (Errno::EACCES)
Permission denied - /var/lib/gems

Any suggestion?

PS: I also noticed that when I install ruby, I get a message like:

No binary rubies available for: ubuntu/12.10/x86_64/ruby-1.9.3-p286.

PPS: the result of

which [gem|ruby|rails] 

points to usr/bin/ruby. What I've noticed is that if i do

. ~/.bash_profile 

then which gem points to my home and i can bundle install. If I reboot though, I have to do . ~/.bash_profile again...

解决方案

From the tutorial:

Under no circumstance should you install Ruby, Rubygems or any Ruby-related packages from apt-get. This system is out-dated and leads to major headaches. Avoid it for Ruby-related packages. We do Ruby, we know what's best. Trust us.

So the first thing, hunt down all the relevant packages (ruby, rubygems, even rvm) in Package Manager and make sure they are completely removed, then reattempt the tutorial again.

If you did everything right, which [gem|ruby|rails] should all be pointing to files in your home folder and not anywhere else.

这篇关于在 Ubuntu 12.10 中安装 rvm 和 bundle:Errno::EACCES的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆