RVM is not working over SSH

前端 未结 10 1595
时光取名叫无心
时光取名叫无心 2020-12-25 13:05

RVM is not working over SSH.

At the command-line:

leifg@host:~$ which ruby
/usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby

Connected

10条回答
  •  猫巷女王i
    2020-12-25 13:40

    Actually, your ~/.bashrc will be executed. The problem is usually that one adds the

    [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
    

    ... snippet at the bottom of the file. However, the default .bashrc on ubuntu systems includes the following near the top

    # If not running interactively, don't do anything
    [ -z "$PS1" ] && return
    

    That call will stop executing the rest of the script and will therefore not set the proper paths. So you can either put the rvm call at the top of the file or remove the return call.

提交回复
热议问题