"警告:安装RVM时有'〜/ .profile'文件"

 huanhuan199538 发布于 2023-01-06 12:25

在以下http://installrails.com/steps/install_rvm_and_ruby中

这是我得到的输出:

~/code/ruby \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   184  100   184    0     0    720      0 --:--:-- --:--:-- --:--:--   721
100 20511  100 20511    0     0  11941      0  0:00:01  0:00:01 --:--:-- 20676
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Upgrading the RVM installation in /Users/adamzerner/.rvm/
    RVM PATH line found in /Users/adamzerner/.profile /Users/adamzerner/.bashrc /Users/adamzerner/.zshrc.
    RVM sourcing line found in /Users/adamzerner/.bash_profile /Users/adamzerner/.zlogin.
Upgrade of RVM in /Users/adamzerner/.rvm/ is complete.

# Adam Zerner,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

Upgrade Notes:


  * WARNING: You have '~/.profile' file, you might want to load it,
    to do that add the following line to '/Users/adamzerner/.bash_profile':

      source ~/.profile

  * No new notes to display.

~/code/ruby type rvm | head -n 1
-bash: type: rvm: not found
~/code/ruby 

昨天我通过了InstallRails指南,一切都运行得很好.我安装了RVM,安装了Rails,安装了Ruby等.然后我不得不更改Ruby版本,因为我的一个站点使用的是旧版本的Ruby(不知道我是怎么做的).

现在,不知怎的,似乎没有安装RVM和Rails.我该怎么办?

编辑:

我感动的内容.profile.bash_profile,改变了名称.profile.pprofile,跑\curl -L https://get.rvm.io | bash -s stable一次.它给了我错误:RVM sourcing line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it..我做到了,它WARNING: You have '~/.profile' file, you might want to load it再次给了我错误.它似乎--auto-dotfiles创建了一个.profile文件.

~ open .profile
~ \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   184  100   184    0     0    596      0 --:--:-- --:--:-- --:--:--   595
100 20511  100 20511    0     0  26570      0 --:--:-- --:--:-- --:--:-- 26570
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Upgrading the RVM installation in /Users/adamzerner/.rvm/
    RVM PATH line found in /Users/adamzerner/.bashrc /Users/adamzerner/.bash_profile /Users/adamzerner/.zshrc.
    RVM sourcing line found in /Users/adamzerner/.zlogin.
    RVM sourcing line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.
Upgrade of RVM in /Users/adamzerner/.rvm/ is complete.

# Adam Zerner,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

Upgrade Notes:

  * No new notes to display.

~ type rvm | head -n 1
-bash: type: rvm: not found
~ \curl -L https://get.rvm.io | bash -s stable --auto-dotfiles
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    791      0 --:--:-- --:--:-- --:--:--   793
100 20511  100 20511    0     0  44948      0 --:--:-- --:--:-- --:--:-- 44948
Turning on auto dotfiles mode.
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Upgrading the RVM installation in /Users/adamzerner/.rvm/
    Removing rvm PATH line from /Users/adamzerner/.bashrc /Users/adamzerner/.bash_profile /Users/adamzerner/.zshrc.
    Adding rvm PATH line to /Users/adamzerner/.profile /Users/adamzerner/.bashrc /Users/adamzerner/.zshrc.
    Removing rvm loading line from /Users/adamzerner/.zlogin.
    Adding rvm loading line to /Users/adamzerner/.bash_profile /Users/adamzerner/.zlogin.
Upgrade of RVM in /Users/adamzerner/.rvm/ is complete.

# Adam Zerner,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

Upgrade Notes:


  * WARNING: You have '~/.profile' file, you might want to load it,
    to do that add the following line to '/Users/adamzerner/.bash_profile':

      source ~/.profile

  * No new notes to display.

~ ls -a
.           .gitconfig      Desktop
..          .heroku         Documents
.CFUserTextEncoding .irb-history        Downloads
.DS_Store       .netrc          Dropbox
.Trash          .pprofile       Library
.bash_history       .profile        Movies
.bash_profile       .rvm            Music
.bashrc         .ssh            Pictures
.dropbox        .zlogin         Public
.dropbox-master     .zshrc          code
.gem            Applications
~ 

小智.. 5

这可能对你有所帮助,但它似乎是完全相同的问题:

这个警告说你有一个文件~/.profile- 当没有文件时,这个文件作为Bash的最后手段加载~/.bash_profile- 并且安装程序找到了这两个文件,这意味着你可能希望某些配置~/.profile在shell启动时可用,但它不会是因为它没有被阅读.要解决问题,您也可以

    删除~/.profile(如果你不使用它),

    移动内容~/.profile~/.bash_profile,或

    将以下行添加到~/.bash_profile(您需要编辑文件):source~/.profile

资料来源:https://github.com/wayneeseguin/rvm/issues/2832

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有