1
我在Mac OSX 10.7.4上。所以我以root身份安裝了RubyGem的rails。爲什麼Rails只有在我是root的時候才能工作?
當我的根,rails -v
得到這樣的:
bash-3.2# rails -v
Rails 3.2.8
但是當我不在根,rails -v
,收益率如下:
Sreejiths-MacBook-Pro:~ sreejith$ rails -v
/opt/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bundler-1.2.1, rake-0.9.2.2, rubygems-bundler-1.1.0, rvm-1.11.3.5] (Gem::LoadError)
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:1231:in `gem'
from /opt/local/bin/rails:22
爲什麼會這樣呢?
+1使用RVM,它真的把房間連接起來^ H^H紅寶石和寶石在一起。 –