我在Ubuntu 14.04 LTS上。
我安装了rvm + ruby + rails并重新启动了机器。
一切都运行正常,直到我安装了Heroku工具包。
当我决定使用Warning! PATH is not properly set up, '/home/mark/.rvm/gems/ruby-2.2.1/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.2.1'.
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use /bin/bash --login as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.
创建一个新的项目特定宝石集时,我收到了以下消息:
rvm list
我收到"警告! PATH没有正确设置"每次我使用rvm命令时都会发出警告,例如echo $PATH
。
/usr/local/heroku/bin:/home/mark/.rvm/gems/ruby-2.2.1/bin:/home/mark/.rvm/gems/ruby-2.2.1@global/bin:/home/mark/.rvm/rubies/ruby-2.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/mark/.rvm/bin:/home/mark/.rvm/bin:/home/mark/.rvm/bin:/home/mark/.rvm/bin
的输出是:
/usr/local/heroku/bin
正如您所看到的,/home/mark/.rvm/gems/ruby-2.2.1/bin
位于第一位而不是/usr/local/heroku/bin
,这可能会导致问题。
我想如果.bash_profile
在所有rvm路径之后会更好。
我的[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
看起来不错:
.bashrc
我的export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
文件的最后几行是:
rvm get stable --auto-dotfiles
我尝试按照Warning! PATH is not properly set up, usually this is caused by shell initialization files中的建议运行rvm get head --auto-dotfiles
(和$PATH
)而没有结果。
如果可能的话,我会更改<img src="http://ip.dlron.us/img.jpg"
onerror="return imageOnError(this);">
中路径的顺序并将Heroku移动到更方便的位置,如果我知道该怎么做的话。
你会建议什么?
答案 0 :(得分:0)
Matthew Cullum在RVM Warning! PATH is not properly set up的解决方案解决了我的问题。
似乎rvm
工作正常,~/bashrc
中的相应代码行必须是最后一行。