Ruby on rails 在教程中安装Rubygems时出现错误消息

Ruby on rails 在教程中安装Rubygems时出现错误消息,ruby-on-rails,rubygems,Ruby On Rails,Rubygems,我正处于Hartl的RoR教程的开始阶段(第1.2.2节),在安装Ruby之后,无法正确安装RubyGems。见下面的顺序: Hansell-Shooks-MacBook-Pro:~ hansellshook$ rvm install 1.9.2 Installing Ruby from source to: /Users/hansellshook/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s

我正处于Hartl的RoR教程的开始阶段(第1.2.2节),在安装Ruby之后,无法正确安装RubyGems。见下面的顺序:

Hansell-Shooks-MacBook-Pro:~ hansellshook$ rvm install 1.9.2
Installing Ruby from source to: /Users/hansellshook/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...

ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /Users/hansellshook/.rvm/src/ruby-1.9.2-p290 (already   extracted)
Fetching yaml-0.1.4.tar.gz to /Users/hansellshook/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/hansellshook/.rvm/src
Configuring yaml in /Users/hansellshook/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/hansellshook/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/hansellshook/.rvm/usr
ruby-1.9.2-p290 - #configuring 
ruby-1.9.2-p290 - #compiling 
ruby-1.9.2-p290 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p290 ...
Installation of rubygems completed successfully.
ruby-1.9.2-p290 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p290 - #importing default gemsets (/Users/hansellshook/.rvm/gemsets/)
Install of ruby-1.9.2-p290 - #complete 
Hansell-Shooks-MacBook-Pro:~ hansellshook$ rvm --create 1.8.7-p352@rails2tutorial 
Hansell-Shooks-MacBook-Pro:~ hansellshook$ rvm --create use 1.9.2-p290@rails3tutorial
Using /Users/hansellshook/.rvm/gems/ruby-1.9.2-p290 with gemset rails3tutorial
Hansell-Shooks-MacBook-Pro:~ hansellshook$ rvm --default use 1.9.2-p290@rails3tutorial
Using /Users/hansellshook/.rvm/gems/ruby-1.9.2-p290 with gemset rails3tutorial
Hansell-Shooks-MacBook-Pro:~ hansellshook$ which gem
/Users/hansellshook/.rvm/rubies/ruby-1.9.2-p290/bin/gem
Hansell-Shooks-MacBook-Pro:~ hansellshook$ [sudo] ruby setup.rb
-bash: [sudo]: command not found

在阅读了序列之后,在我看来,在安装Ruby 1.9.2时,安装已经开始了。然而,我不能从这一点(即安装Rails)再进一步。有人知道我可能遗漏了什么吗?

不要在
sudo
周围的括号中键入;这表示
sudo
是可选的/可能不是必需的/可能不适用于您的系统。你正在运行Mac,所以你可以使用它