Ruby不是从mac os x开始的

时间:2012-06-03 20:36:48

标签: ruby macos rvm

当我尝试在终端上使用ruby时,没有任何反应。 我使用它的最后几天,一切正常,但现在已经不复存在了。 我安装了rvm和1.9.3版本的ruby。 当我使用ruby myscript.rb启动脚本时它会起作用,我尝试安装rails但是当我输入gem install rails时出现错误: /Users/romainberger/.rvm/rubies/ruby-1.9.3-p194/bin/gem:4: warning: Insecure world writable dir /Users/romainberger/.rvm/gems/ruby-1.9.3-p194 in PATH, mode 040777

由于没有输出,我不知道问题的来源。有人有想法吗?

由于

修改 rvm info

ruby-1.9.3-p194:

system:
uname:       "Darwin romain.home 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64"
bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)"
zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin11.0)"

rvm:
version:      "rvm 1.14.1 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated:      "1 day 11 hours 59 minutes 3 seconds ago"

ruby:
interpreter:  "ruby"
version:      "1.9.3p194"
date:         "2012-04-20"
platform:     "x86_64-darwin11.3.0"
patchlevel:   "2012-04-20 revision 35410"
full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]"

homes:
gem:          "/Users/romainberger/.rvm/gems/ruby-1.9.3-p194"
ruby:         "/Users/romainberger/.rvm/rubies/ruby-1.9.3-p194"

binaries:
ruby:         "/Users/romainberger/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
irb:          "/Users/romainberger/.rvm/rubies/ruby-1.9.3-p194/bin/irb"
gem:          "/Users/romainberger/.rvm/rubies/ruby-1.9.3-p194/bin/gem"
rake:         "/Users/romainberger/.rvm/gems/ruby-1.9.3-p194@global/bin/rake"

environment:
PATH:         "/Users/romainberger/.rvm/gems/ruby-1.9.3-p194/bin:/Users/romainberger/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/romainberger/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/romainberger/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin"
GEM_HOME:     "/Users/romainberger/.rvm/gems/ruby-1.9.3-p194"
GEM_PATH:     "/Users/romainberger/.rvm/gems/ruby-1.9.3-p194:/Users/romainberger/.rvm/gems/ruby-1.9.3-p194@global"
MY_RUBY_HOME: "/Users/romainberger/.rvm/rubies/ruby-1.9.3-p194"
IRBRC:        "/Users/romainberger/.rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT:      ""
gemset:       ""

gem info给了我:

ERROR:  While executing gem ... (RuntimeError)
Unknown command info

要启动ruby,我只需输入ruby

1 个答案:

答案 0 :(得分:2)

修复宝石警告使用:

chmod -R go-w /Users/romainberger/.rvm/

它将以递归方式删除组和其他人的写权限(为用户保留写入)。

您可以在RVM站点上检查RVM相关的resurces:https://rvm.io/