1

If I type "rake spec" I get. /usr/bin/env: ruby1.9.1: No such file or directory This problem started happening when I uninstalled ruby 1.9.1 and used rvm to install the latest ruby version but now when I type rails -v or rake spec, they're still pointing to the old nonexisting ruby.

This is what my bashrc looks like

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting

export PATH="/usr/local/bin:$PATH"
export PATH="$PATH:$HOME/.linuxbrew/bin"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
export PATH=$PATH:/usr/local/rvm/rubies/ruby-2.1.1/bin

What do I do?

Another error when I try bundle install I get

-bash: /usr/local/bin/bundle: /usr/bin/ruby1.9.1: bad interpreter: No such file or directory
0

It is possible that PATH still contains the old ruby location (/usr/bin/env).

Try appending your new ruby bin before $PATH.

Like follows:

export PATH=/new_bin/:$PATH

If another ruby bin path is before the new one, it will be of higher priority in PATH.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.