Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command not found after installing pry

I installed pry and related gems using the following line in a bash prompt:

gem install pry-plus --no-ri --no-rdoc

Successful gem installation was reported from that command.

All the instructions I've found say that after installing pry I can get to a pry prompt by entering pry as a bash command. However, the actual result is bash: pry: command not found

which pry reports no pry in (...) where the ellipses are $PATH. In contrast, which rake reports /local/tbh/rbenv/shims/rake and which gem reports /local/tbh/rbenv/shims/gem

Why did the command for pry not get created by gem install? How can I get it to work as designed?

(I'm using Ruby 1.9.3 with rbenv (not RVM) under Scientific Linux as a virtual environment.)

like image 917
kaleidic Avatar asked Jun 26 '13 18:06

kaleidic


1 Answers

rbenv caches current Ruby executables as so-called shims. You have to run

$ rbenv rehash

after installing a new executable in order to refresh the shims.

like image 60
Stefan Avatar answered Nov 11 '22 07:11

Stefan