How to run pry on Debian Linux for ARM

I installed rvm and Ruby 1.9.3p194 on a Raspberry Pi using Debian Linux. When I installed pry with gem install pry, everything worked fine, but typing pry in the terminal did not work:

pi@raspberrypi ~ $ pry
bash: pry: command not found

there is a pry file in ~/.rvm/gems/ruby-1.9.3-p194/bin. I have to call it with ruby_noexec_wrapper in the same directory:

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)>

How can I run pry on this Linux? On Windows and Mac OS X, I can just type pry in any command line or terminal.

UPDATE : Here is my 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:       ""
+5
source share
1 answer

first make sure rvm is loaded correctly:

type rvm | head -n 1 # should be: rvm is a function
type gem | head -n 1 # should be: gem is a function

, , RVM , ​​ (, bash),

rvm get head --auto

.

, , rvm:

rvm use 1.9.3
echo $PATH
echo $GEM_PATH # those two need match those from `rvm info`
rvm info

:

rvm use 1.9.3 --default

PATH-

hash -r # OR:
PATH="$PATH"

relogin .

+1

All Articles