我是一个相当新手的命令行用户,不了解 Ruby on Rails 的全部含义,sudo
并且一直在自学 Ruby on Rails。我最近使用 RVM 重新安装了 Ruby 和 Rails,因为我遇到了很多很多问题。大约两周前,我在干净的 Mac OS X 上做了这个。
现在,每当我运行bundle
. 做了一些搜索,发现我的问题有两个相反的答案,一个告诉我使用 sudo 安装(安装 gems 时停止询问密码),另一个不告诉我(为什么 rvm install 2.0.0 要求输入 sudo 密码?)。
我不知道我在做什么。
也许是因为我以 root 身份登录并且我实际上并不想将它安装到我的系统中?然后我如何安装它,而不是安装到我的系统上?我将如何以任何用户身份登录?
这一切都没有任何意义,如果有人能在这里救我,我会很高兴的。
我是否使用卸载 RVMrvm implode
并重新启动?即使我已经使用 Ruby 安装了一些 gem,我的系统 Ruby 还可以sudo
吗?
根据要求,这是我的rvm info
:
device-3ebf56:~ tjobbeandrews$ rvm info
ruby-2.0.0-p247:
system:
uname: "Darwin device-3ebf56 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64"
system: "osx/10.8/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"
zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"
rvm:
version: "rvm 1.22.14 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "16 days 20 hours 12 minutes 43 seconds ago"
path: "/Users/tjobbeandrews/.rvm"
ruby:
interpreter: "ruby"
version: "2.0.0p247"
date: "2013-06-27"
platform: "x86_64-darwin12.3.0"
patchlevel: "2013-06-27 revision 41674"
full_version: "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]"
homes:
gem: "/Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247"
ruby: "/Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247"
binaries:
ruby: "/Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247/bin/ruby"
irb: "/Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247/bin/irb"
gem: "/Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247/bin/gem"
rake: "/Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247@global/bin/rake"
environment:
PATH: "/Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247/bin:/Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/tjobbeandrews/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin"
GEM_HOME: "/Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247"
GEM_PATH: "/Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247:/Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247@global"
MY_RUBY_HOME: "/Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247"
IRBRC: "/Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247/.irbrc"
RUBYOPT: ""
gemset: ""
我的gem env
:
device-3ebf56:~ tjobbeandrews$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.6
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.3.0]
- INSTALLATION DIRECTORY: /Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247
- RUBY EXECUTABLE: /Users/tjobbeandrews/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
- EXECUTABLE DIRECTORY: /Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247
- /Users/tjobbeandrews/.rvm/gems/ruby-2.0.0-p247@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/