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

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 无法在Snow Leopard上安装乘客3(使用RVM和ruby 1.9.2)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直试图安装乘客但还没有成功.

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

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写,但由于某种原因你导致不是这样的.

原文链接:https://www.f2er.com/ruby/269846.html

猜你在找的Ruby相关文章