[英]How do I fix '/bin/bash/: command not found' in vim w/ rails-vim plugin?
I'm using gvim and rails.vim and getting the following error when attempting to run :Rake
from within a migration: 我正在使用gvim和rails.vim并尝试从迁移中运行:Rake
时出现以下错误:
:!rake db:migrate VERSION=20100427002644 2>&1| tee /tmp/v436868/11
/bin/bash/: rake: command not found
I'm not sure how to troubleshoot this. 我不确定如何解决此问题。 What can I do to fix this? 我该怎么做才能解决此问题?
Edit: 编辑:
If i run rake --version
from the terminal it works fine. 如果我从终端运行rake --version
,它将正常工作。
Looks like rake isn't on your path. 看起来耙子不在路上。 Make sure that $PATH includes wherever the 'rake' executable is. 确保$ PATH包括“ rake”可执行文件所在的位置。
OP's following comment gives a workaround, which I would consider an answer: OP的以下评论提供了一种解决方法,我将考虑一个答案:
When I open gvim from an ubuntu menu my path is incorrect. 当我从ubuntu菜单打开gvim时,我的路径不正确。 However, opening from a terminal sets the correct path and the rake command works. 但是,从终端打开会设置正确的路径,并且rake命令会起作用。
(I don't have enough reputation to upvote that comment.) (我没有足够的声誉来支持该评论。)
Rake isn't in your $PATH
. Rake不在$PATH
。 I suppose you're using rvm
, which operates via .bashrc
to add rake
to your $PATH
. 我想您正在使用rvm
,它通过.bashrc
进行操作,以将rake
添加到$PATH
。 I'm not sure :!source ~/.bashrc
helps. 我不确定:!source ~/.bashrc
帮助。 Some .bashrc
got [ -z "$PS1" ] && return
to check for an interactive session on top. 一些.bashrc
得到了[ -z "$PS1" ] && return
以检查顶部的交互式会话。 Be sure the rvm
include is above that line. 确保rvm
include在该行上方。
[root@localhost ~]# cp /usr/local/sbin/keepalived /usr/sbin/
[root@localhost ~]# /etc/init.d/keepalived start
Starting keepalived: [ OK ]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.