views:

148

answers:

1

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

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.

A: 

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

perimosocordiae
I agree, rake works fine from the terminal though. How do I verify that rake is available to gvim's environment?
TheDeeno
@TheDeeno check the output of `:!echo $PATH`.
ZyX
Ok, interesting. 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. Any idea how to change gvim's path when opened through gnome?
TheDeeno
Try running `:!source ~/.bashrc` (or whatever rc file your shell normally reads), and then running rake from gvim.
perimosocordiae