加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 无法在Snow Leopard上安装乘客3(使用RVM和ruby

发布时间:2020-12-17 01:18:34 所属栏目:百科 来源:网络整理
导读:我一直试图安装乘客但还没有成功. 我安装了宝石,但是当我跑的时候 passenger-install-apache2-module 它告诉我 This installer must be able to write to the following directory:/Users/myname/.rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.0But it can't
我一直试图安装乘客但还没有成功.

我安装了宝石,但是当我跑的时候

passenger-install-apache2-module

它告诉我

This installer must be able to write to the following directory:
/Users/myname/.rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.0
But it can't do that,because you're running the installer as myname.
Please re-run this installer as root.

但如果我这样做

sudo passenger-install-apache2-module

我明白了

/Users/myname/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error': Could not find RubyGem passenger (>= 0) (Gem::LoadError)

来自/Users/myname/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:219:in activate’
来自/Users/myname/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:1065:ingem’
来自/Users/myname/.rvm/gems/ruby-1.9.2-p0/bin/passenger-install-apache2-module:18:in`

我试着看看那些文件,但无法理解什么是错的.

你能帮忙吗?

谢谢,P

解决方法

两种解决方案

>使用rvmsudo,而不是sudo.>修复目录权限. /Users/myname/.rvm应该可以为myname写,但由于某种原因你导致不是这样的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读