ruby-on-rails - RVM 正确安装后无法工作?

标签 ruby-on-rails macos path rvm bash

好吧,我之前 RVM 可以工作,但是在我升级到 Mountain Lion 后,它似乎消失了?所以我尝试重新安装它:

Ayman$ curl -L https://get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0    200      0 --:--:-- --:--:-- --:--:--   755
100  9979  100  9979    0     0   5911      0  0:00:01  0:00:01 --:--:--  5911  
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100   125  100   125    0     0     67      0  0:00:01  0:00:01 --:--:--   102
100 1047k  100 1047k    0     0   159k      0  0:00:06  0:00:06 --:--:--  245k

Upgrading the RVM installation in /Users/Ayman/.rvm/
RVM PATH line found in /Users/Ayman/.zshrc.
RVM sourcing line found in /Users/Ayman/.zlogin.

Upgrade Notes:

  * No new notes to display.

# RVM:  Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use-rvm

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'

Upgrade of RVM in /Users/Ayman/.rvm/ is complete.

# Ayman ####,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne


rvm 1.15.5 (stable) by Wayne E. Seguin <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="592e3820373c3c2a3c3e2c3037193e34383035773a3634" rel="noreferrer noopener nofollow">[email protected]</a>>, Michal Papis    <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="305d405140594370575d51595c1e535f5d" rel="noreferrer noopener nofollow">[email protected]</a>> [https://rvm.io/]

应该安装了吧?应该准备好了,但是...

Ayman$ which rvm
Ayman$ rvm requirements
-bash: rvm: command not found
Ayman$ rvm use 1.9.2 --default
-bash: rvm: command not found

现在确定要做什么吗?查看我的 .bash_profile 和 .bashrc 看看里面有什么:

Ayman$ ls -la
total 136
drwxr-xr-x+ 26 Ayman  staff    884 Aug 23 20:44 .
drwxr-xr-x   6 root   admin    204 Aug  8 19:27 ..
-rw-------   1 Ayman  staff      3 Jun 16 15:21 .CFUserTextEncoding
-rw-r--r--@  1 Ayman  staff  21508 Aug 23 08:03 .DS_Store
drwx------  10 Ayman  staff    340 Aug 23 07:57 .Trash
-rw-------   1 Ayman  staff   9089 Aug 23 20:47 .bash_history
-rw-r--r--   1 Ayman  staff    106 Aug 22 21:17 .bash_profile
-rw-r--r--   1 Ayman  staff     24 Aug 23 20:47 .bashrc
drwxr-xr-x   3 Ayman  staff    102 Aug 21 20:41 .bundler
drwxr-xr-x   3 Ayman  staff    102 Jun 24 21:45 .gem
-rw-r--r--   1 root   staff    155 Aug 21 22:52 .gemrc
-rw-r--r--   1 Ayman  staff     61 Aug 21 19:40 .gitconfig
-rw-r--r--   1 Ayman  staff     14 Aug 23 08:14 .irb_history
-rw-------   1 Ayman  staff   2415 Aug 23 20:44 .mysql_history
drwxr-xr-x  29 Ayman  staff    986 Aug 23 20:58 .rvm
-rw-r--r--   1 Ayman  staff    118 Jun 24 21:25 .zlogin
-rw-r--r--   1 Ayman  staff     59 Jun 24 21:25 .zshrc
drwx------+ 18 Ayman  staff    612 Aug 23 08:02 Desktop
drwx------+  5 Ayman  staff    170 Jun 24 23:04 Documents
drwx------+ 19 Ayman  staff    646 Aug 22 21:05 Downloads
drwx------@ 47 Ayman  staff   1598 Aug  9 22:30 Library
drwx------+  3 Ayman  staff    102 Jun 16 15:21 Movies
drwx------+  5 Ayman  staff    170 Jun 24 23:05 Music
drwx------+ 57 Ayman  staff   1938 Aug 19 22:40 Pictures
drwxr-xr-x+  5 Ayman  staff    170 Jun 16 15:21 Public
drwxr-xr-x   5 Ayman  staff    170 Aug 23 07:57 Sites

这是我的 nano .bashprofile:

PS1="\u$ "
alias ll="ls -lahG"

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

这是我的 nano .bashrc(我根据另一个 stackoverflow 答案中的说明更改了它):

PATH=$PATH:~/.rvm/bin

关于下一步要尝试什么有任何线索吗?谢谢!

最佳答案

强制更新 rc 文件:

curl -L https://get.rvm.io | bash -s stable --auto-dotfiles

关于ruby-on-rails - RVM 正确安装后无法工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12103113/

相关文章:

c - 在 Mac OS X Snow Leopard 中禁用 ASLR

java - UnsatisfiedLinkError 在 Mac 上的 Eclipse 中使用 JavaCV

c - 在C中给定字符串中插入 "String"变量

ruby-on-rails - 使用 ActiveSupport::Deprecation 标记已弃用的方法

ruby-on-rails - 对于计算量大的查询,find_by_sql 的替代方法是什么?

ruby-on-rails - 设计 after_sign_in_path_for 不工作;当模型在 : :update 上进行验证时被忽略

git - 在 Vagrant 框内进行 git pull 后随机获取 "unable to unlink old ' <file >' (Permission denied)"

ruby-on-rails - 通过 API 作为页面发布到 Facebook 页面(具有管理员权限)

python - 命令 python3 只是 py -3 的 OS X 变体吗?

windows下php访问网络路径