I am trying to move to GVim(cream) as my primary editor on Ubuntu. I am using the wonderful rails.vim, however I also am using RVM.
Rvm works fine when doing things in a shell, and the ruby version I would like to use in rails.vim is the version set as default (but not the system version).
When I try to run things like
:Rgenerate migration migration_name
I get:
...
Missing Rails 2.3.8 gem.
...
If I try:
:!rvm use default
I get:
/bin/bash: rvm: command not found
Obviously cream/gvim is not using my .bashrc. What can I do to remedy this and get it working? Thanks.
Try running cream from the command line, if this solves the issue you can point your menu item to a script that opens cream in the context of a bash prompt.
This is because you are sourcing the rvm scripts in your .zshrc file. MacVim does not source the .zshrc file, but will source the .zshenv file.
Add following line to your .vimrc file.
set shell=/bin/sh
You probably have used .bash_profile to add RVM stuff to your bash environment. Alas, ~/.bash_profile won't normally be read by X startup scripts, as stated in Ubuntu Help
Use .profile or .bashrc. The .profile is only sourced by bash if .bash_profile is not there. I would use .bashrc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With