I installed pry and related gems using the following line in a bash prompt:
我在bash提示符中使用以下行安装了pry和相关的gem:
gem install pry-plus --no-ri --no-rdoc
Successful gem installation was reported from that command.
从该命令报告了成功的gem安装。
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
我发现的所有说明都说安装pry之后我可以通过输入pry作为bash命令来获得pry提示符。但是,实际结果是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
哪个pry报告在(...)中省略了$ PATH。相比之下,哪个rake报告/ local / tbh / rbenv / shims / rake以及哪个gem报告/ 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?
为什么pry的命令不是由gem install创建的?我怎样才能让它按设计工作?
(I'm using Ruby 1.9.3 with rbenv (not RVM) under Scientific Linux as a virtual environment.)
(我在Scientific Linux下使用Ruby 1.9.3和rbenv(不是RVM)作为虚拟环境。)
1 个解决方案
#1
18
rbenv caches current Ruby executables as so-called shims. You have to run
rbenv将当前的Ruby可执行文件缓存为所谓的填充程序。你必须跑
$ rbenv rehash
after installing a new executable in order to refresh the shims.
安装新的可执行文件后,以刷新填充程序。
#1
18
rbenv caches current Ruby executables as so-called shims. You have to run
rbenv将当前的Ruby可执行文件缓存为所谓的填充程序。你必须跑
$ rbenv rehash
after installing a new executable in order to refresh the shims.
安装新的可执行文件后,以刷新填充程序。