RVM is not working in ZSH
Do you have this line in your ~/.zshrc?
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
RVM + Zsh RVM is not a function, selecting rubies with 'rvm use ...' will not work
Turns out that RVM was installed in the wrong place. When I had initially installed RVM I believe I did so with the sudo
command, which ran the multi-user install (installed to /usr/local/rvm
), and not the single user (should be in ~/.rvm/scrips/rvm
), which is why all the posted solutions were not working for me.
I had to uninstall RVM with rvm implode
. There were some permissions issues, so I had to manually go in and delete the files that could not be deleted. Ran the curl command to re-install RVM and now it's installed in the correct place.
Sourcing RVM in my .zshrc
with [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
now works properly and I can switch between rubies.
rvm command not found
Possible duplicate of: Ubuntu rvm setup issue
Your problem is that RVM is not loaded when you open a new terminal.
To solve this, run this command line: (if using login-shell)
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
Or this (if using non-login shell):
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc
Or if you are using zsh
(and/or oh-my-zsh):
echo "source $HOME/.rvm/scripts/rvm" >> ~/.zshrc
This will add the path to RVM to load at each Terminal instantiation. You must either close and reopen your terminals or simply call source ~/.bashrc
(or ~/.bash_profile
or ~/.zshrc
).
Pow, RVM and ZSH not working together
Ok, seems like POW is moving away from RVM.
I needed to run this in my projects root to get it working:rvm env . -- --env > .powenv
rvm installation not working: RVM is not a function
You are not using an login shell.
The process of enabling the login flag is described here, also some details on what a login shell is can be found here.
Thus, you need to check the option "Run as login shell" in the Gnome terminal's settings. It is required to open new terminal after this setting the flag.
Sometimes it is required to set the command to /bin/bash --login
.
For remote connections it is important to understand the differene between running interactive ssh
session and executing single commands.
While running ssh server
and then working with the server interactively you are using login shell by default and it's all fine, but for ssh server "command"
you are not using login shell and it would be required to run it with ssh server 'bash -lc "command"'
.
Any remote invocation can have the same problem as executing single command with ssh
.
rvm: command not found MAC OX
It might because the terminal not having rvm shell configuration loaded.
Try following from your terminal:
$ source ~/.rvm/scripts/rvm
then
$ type rvm | head -n 1
If the output is:
rvm is a function
You may need to add "source ~/.rvm/scripts/rvm" to your ~/.bash_profile file
Related Topics
Before/After Suite When Using Ruby Minitest
Rack::Request - How to Get All Headers
To_Specs': Could Not Find Chef (>= 0) Amongst [] (Gem::Loaderror)
Calling Sinatra from Within Sinatra
How to Traverse Symlinked Directories in Ruby with a "**" Glob
Elasticsearch & Tire: Using Mapping and To_Indexed_JSON
Generate an HTML Table from an Array of Hashes in Ruby
Redirect User After Log in Only If It's on Root_Path
How to Get the Last SQL Query Performed by Activerecord in Ruby on Rails
Force Browser to Download File Instead of Opening It
How Is Each_With_Object Supposed to Work
Ruby - Digest::Digest Is Deprecated; Use Digest
Ruby, !! Operator (A/K/A the Double-Bang)
Ruby on Rails: Delete Multiple Hash Keys