rvm and bundle install in Ubuntu 12.10: Errno::EACCES

无人久伴 提交于 2019-12-10 19:20:39

问题


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...


回答1:


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.



来源:https://stackoverflow.com/questions/13055062/rvm-and-bundle-install-in-ubuntu-12-10-errnoeacces

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!