gpt4 book ai didi

ruby-on-rails - "Warning: You have ' ~/.profile ' file"安装RVM时

转载 作者:数据小太阳 更新时间:2023-10-29 07:23:44 25 4
gpt4 key购买 nike

在下面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 again。 --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
~

最佳答案

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

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

  1. 删除~/.profile(以防你不使用它),
  2. ~/.profile的内容移动到~/.bash_profile,或者
  3. 将以下行添加到 ~/.bash_profile(您需要编辑该文件):source ~/.profile

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

关于ruby-on-rails - "Warning: You have ' ~/.profile ' file"安装RVM时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24578531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com