我使用 Debian Linux 在 Raspberry Pi 上安装了 rvm 和 Ruby 1.9.3p194。当我使用pry 安装时gem install pry
,一切都安装得很好,但是在终端中输入 pry 不起作用:
pi@raspberrypi ~ $ pry
bash: pry: command not found
中有一个撬文件~/.rvm/gems/ruby-1.9.3-p194/bin
。我必须在同一目录中使用 ruby_noexec_wrapper 调用它:
pi@raspberrypi ~ $ .rvm/gems/ruby-1.9.3-p194/bin/pry
/usr/bin/env: ruby_noexec_wrapper: No such file or directory
pi@raspberrypi ~ $ cd .rvm/gems/ruby-1.9.3-p194/bin
pi@raspberrypi ~/.rvm/gems/ruby-1.9.3-p194/bin $ ./ruby_noexec_wrapper pry
[1] pry(main)>
在这个 Linux 中运行 pry 的正确方法是什么?在 Windows 和 Mac OS XI 上,只需在任何命令提示符或终端键入 pry。
更新:这是我的rvm info
:
pi@raspberrypi ~/.rvm/gems/ruby-1.9.3-p194/bin $ rvm info
ruby-1.9.3-p194:
system:
uname: "Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv6l GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.2.20(1)-release (arm-unknown-linux-gnueabihf)"
zsh: " => not installed"
rvm:
version: "rvm 1.14.10 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "1 day 23 hours 36 minutes 30 seconds ago"
ruby:
interpreter: "ruby"
version: "1.9.3p194"
date: "2012-04-20"
platform: "armv6l-linux-eabi"
patchlevel: "2012-04-20 revision 35410"
full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [armv6l-linux-eabi]"
homes:
gem: "/home/pi/.rvm/gems/ruby-1.9.3-p194"
ruby: "/home/pi/.rvm/rubies/ruby-1.9.3-p194"
binaries:
ruby: "/home/pi/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
irb: "/home/pi/.rvm/rubies/ruby-1.9.3-p194/bin/irb"
gem: "/home/pi/.rvm/rubies/ruby-1.9.3-p194/bin/gem"
rake: "/home/pi/.rvm/gems/ruby-1.9.3-p194@global/bin/rake"
environment:
PATH: "/home/pi/.rvm/gems/ruby-1.9.3-p194/bin:/home/pi/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/pi/.rvm/rubies/ruby-1.9.3-p194/bin:/home/pi/.rvm/bin:/usr/lib/arm-linux-gnueabihf/libfm:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
GEM_HOME: "/home/pi/.rvm/gems/ruby-1.9.3-p194"
GEM_PATH: "/home/pi/.rvm/gems/ruby-1.9.3-p194:/home/pi/.rvm/gems/ruby-1.9.3-p194@global"
MY_RUBY_HOME: "/home/pi/.rvm/rubies/ruby-1.9.3-p194"
IRBRC: "/home/pi/.rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT: ""
gemset: ""