pratuat
pratuat

Reputation: 125

oh-my-zsh throwing error with rvm

I was trying to switch to zsh and oh-my-zsh console for RubyonRails projects. However after installing and appending "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . “$HOME/.rvm/scripts/rvm”" to .zshrc, I am getting the error as

/home/pratuat/.zshrc:33: no such file or directory: “/home/pratuat/.rvm/scripts/rvm”
➜  ~  cd /home/pratuat/.rvm/scripts  
➜  scripts  ls
alias       disk-usage             help        migrate       rvm
aliases     docs                   hook        monitor       rvm-install
array       env                    info        notes         selector
base        environment-convertor  initialize  override_gem  set
cd          extract                install     package       snapshot
cleanup     extras                 irbrc       patches       tools
cli         fetch                  irbrc.rb    patchsets     update
color       functions              list        pkg           upgrade
completion  gemsets                maglev      repair        version
current     get                    manage      requirements  wrapper
db          group                  match       rtfm          zsh
default     hash                   md5         rubygems

permissions to the rvm file is ok, but ~/.zshrc is still not getting it

Upvotes: 1

Views: 1783

Answers (2)

Praveen Gowda I V
Praveen Gowda I V

Reputation: 9637

The actual problem is with the quotes in “$HOME/.rvm/scripts/rvm” Try replacing your line with the one below and it might work

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

Note that there is a difference between “” and "".

Upvotes: 1

nouh
nouh

Reputation: 582

carefully inspect [[ -s "$HOME/.rvm/scripts/rvm" ]] && . “$HOME/.rvm/scripts/rvm" statement. You may copy this from others' blog post. If you are on mac,try to replace "." with "source", sometimes this will work.

Upvotes: 1

Related Questions