开发者

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:

:!rake db:migrate VERSION=20100427002644 2>&1| tee /tmp/v436868/11 
/bin/bash/: rake: command not found
开发者_JS百科

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.


Looks like rake isn't on your path. Make sure that $PATH includes wherever the 'rake' executable is.


OP’s following comment gives a workaround, which I would consider an answer:

When I open gvim from an ubuntu menu my path is incorrect. However, opening from a terminal sets the correct path and the rake command works.

(I don’t have enough reputation to upvote that comment.)


Rake isn't in your $PATH. I suppose you're using rvm, which operates via .bashrc to add rake to your $PATH. I'm not sure :!source ~/.bashrc helps. Some .bashrc got [ -z "$PS1" ] && return to check for an interactive session on top. Be sure the rvm include is above that line.


[root@localhost ~]# cp /usr/local/sbin/keepalived /usr/sbin/

[root@localhost ~]# /etc/init.d/keepalived start
Starting keepalived:                                       [  OK  ]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜