RVM is not a function in VSCode

RVM is not a function

While trying to change my ruby version with rvm use in VSCode with RVM I kept getting this error: RVM is not a function.

Login Shell

I found out that VSCode was not using a login shell for the terminal. In turn, this was not loading up the proper bash profile. Some people suggested modifying .bash_profile and .bashrc but many wanted to avoid modifying those files and going that route.

The Fix, Login Shell Launch Parameter

The fix ended up being rather simple after a long witch chase.

Go into VSCode’s settings and look for args. You should see shell args for the different operating systems.

Adding the following will allow the VSCode terminal to launch with a login shell. This fix also sounds like it is applicable to Linux.

"terminal.integrated.shellArgs.osx": ["-l"]

Resources

This entry was posted in Mac and tagged , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Leave your thoughts...

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*
*