bash says command not found for ri and irb

Discussion in 'Ruby' started by cles2@comcast.net, Nov 10, 2005.

  1. Guest

    Converting from Windows XP to Linux, I have formatted one of my
    computers with Ubuntu 5,10 which has Ruby 1.8.3 installed. I can create
    and execute ruby files (.rb) with no problems. However, when i try irb
    bash reports that the file cannot be found. Same with ri.

    I'm an experienced programmer but getting set up is driving me nuts.
    I'm also having problems trying to download RubyGems and Rails, but I
    have not really progressed far enough to worry about that yet. Help?

    Les
     
    , Nov 10, 2005
    #1
    1. Advertising

  2. On Fri, Nov 11, 2005 at 04:27:13AM +0900, wrote:
    > Converting from Windows XP to Linux, I have formatted one of my
    > computers with Ubuntu 5,10 which has Ruby 1.8.3 installed. I can create
    > and execute ruby files (.rb) with no problems. However, when i try irb
    > bash reports that the file cannot be found. Same with ri.


    sudo apt-get install irb ri

    > I'm an experienced programmer but getting set up is driving me nuts.
    > I'm also having problems trying to download RubyGems and Rails, but I
    > have not really progressed far enough to worry about that yet. Help?


    When it comes time to get RubyGems and Rails you'll need zlib and yaml.

    sudo apt-get install libyaml-ruby1.8 libzlib-ruby1.8

    marcel
    --
    Marcel Molina Jr. <>
     
    Marcel Molina Jr., Nov 10, 2005
    #2
    1. Advertising

  3. wrote:

    >Converting from Windows XP to Linux, I have formatted one of my
    >computers with Ubuntu 5,10 which has Ruby 1.8.3 installed. I can create
    >and execute ruby files (.rb) with no problems. However, when i try irb
    >bash reports that the file cannot be found. Same with ri.
    >
    >I'm an experienced programmer but getting set up is driving me nuts.
    >I'm also having problems trying to download RubyGems and Rails, but I
    >have not really progressed far enough to worry about that yet. Help?
    >
    >Les
    >
    >

    If you fire up synaptic and search for irb and ri you'll find that they
    have their own entries. You should be able to install them without too
    much difficulty.

    Rubygems, on the other hand, might give you some problems.

    I managed to get ruby (and all of my favorite gems) set up working on my
    Ubuntu 5.10 system recently. If you need any more help you can ask here
    or I'll also
    be glad to help off-list.

    Matthew
     
    Matthew Desmarais, Nov 10, 2005
    #3
  4. On Nov 10, 2005, at 11:27 AM, wrote:

    > Converting from Windows XP to Linux, I have formatted one of my
    > computers with Ubuntu 5,10 which has Ruby 1.8.3 installed. I can
    > create
    > and execute ruby files (.rb) with no problems. However, when i try irb
    > bash reports that the file cannot be found. Same with ri.
    >
    > I'm an experienced programmer but getting set up is driving me nuts.
    > I'm also having problems trying to download RubyGems and Rails, but I
    > have not really progressed far enough to worry about that yet. Help?
    >
    > Les



    Les-

    I find the ruby and rails packages on Ubuntu to be confusing and
    hard to get right. So I install from source and end up with a perfect
    environment for rails dev. I have a crib sheet on how to install the
    whole stack ruby/gems/lighttpd/mysql/fcgi on my blog. Maybe this
    helps you a bit?

    http://brainspl.at/pages/rails_stack

    Good luck-

    -Ezra Zygmuntowicz
    Yakima Herald-Republic
    WebMaster
    http://yakimaherald.com
    509-577-7732
     
    Ezra Zygmuntowicz, Nov 10, 2005
    #4
  5. Guest

    Speaking of RubyGems, I did as you said using the
    sudo apt-get install libyaml-ruby1.8 libzlib-ruby1.8 and everything
    seemed to be operating correctly.

    The apt-get process stated selecting libruby1.8 instead of
    libyaml-ruby1.8 and selecting libruby1.8 instead of libzlib-ruby1.8 but
    ended saying 0 upgraded, 0 newly installed, 0 to remove and 0 not
    upgraded.

    Then I tried the setup as follows:
    @ubuntu:~/MyDocuments/Downloads/gem/rubygems-0.8.11$ ruby setup.rb
    ---> bin
    <--- bin
    ---> lib
    ---> lib/rubygems
    <--- lib/rubygems
    <--- lib
    ---> bin
    <--- bin
    ---> lib
    ---> lib/rubygems
    <--- lib/rubygems
    <--- lib
    rm -f InstalledFiles
    ---> bin
    mkdir -p /usr/bin/
    install gemwhich /usr/bin/
    setup.rb:513:in `initialize': Permission denied - /usr/bin/gemwhich
    (Errno::EACCES)
    from setup.rb:513:in `install'
    from setup.rb:1193:in `install_files'
    from setup.rb:1192:in `each'
    from setup.rb:1192:in `install_files'
    from setup.rb:1172:in `install_dir_bin'
    from setup.rb:1321:in `traverse'
    from setup.rb:1319:in `dive_into'
    from setup.rb:1319:in `traverse'
    from setup.rb:1313:in `exec_task_traverse'
    from setup.rb:1308:in `each'
    from setup.rb:1308:in `exec_task_traverse'
    from setup.rb:1168:in `exec_install'
    from setup.rb:887:in `exec_install'
    from setup.rb:705:in `invoke'
    from setup.rb:674:in `invoke'
    from setup.rb:1352

    A couple of times I got permission denied, but I am the sole owner of
    my computer.

    It looks like RubyGems might be installed, but if so, not in the right
    directory or possibly not in the path?

    Anyway I still get file not found after I type gem at the command line.

    Hope this is not too much for you. Any help would be greatly
    appreciated. I am dying to get at the applications programming, but
    this is killing me!

    Thanks,
    Les
     
    , Nov 10, 2005
    #5
  6. On Fri, Nov 11, 2005 at 07:27:14AM +0900, wrote:
    > Speaking of RubyGems, I did as you said using the
    > sudo apt-get install libyaml-ruby1.8 libzlib-ruby1.8 and everything
    > seemed to be operating correctly.
    >
    > The apt-get process stated selecting libruby1.8 instead of
    > libyaml-ruby1.8 and selecting libruby1.8 instead of libzlib-ruby1.8 but
    > ended saying 0 upgraded, 0 newly installed, 0 to remove and 0 not
    > upgraded.


    Cool, looks like you already had these libraries.

    > Then I tried the setup as follows:
    > @ubuntu:~/MyDocuments/Downloads/gem/rubygems-0.8.11$ ruby setup.rb
    > ---> bin
    > <--- bin
    > ---> lib
    > ---> lib/rubygems
    > <--- lib/rubygems
    > <--- lib
    > ---> bin
    > <--- bin
    > ---> lib
    > ---> lib/rubygems
    > <--- lib/rubygems
    > <--- lib
    > rm -f InstalledFiles
    > ---> bin
    > mkdir -p /usr/bin/
    > install gemwhich /usr/bin/
    > setup.rb:513:in `initialize': Permission denied - /usr/bin/gemwhich
    > (Errno::EACCES)
    > from setup.rb:513:in `install'


    <snip>

    > A couple of times I got permission denied, but I am the sole owner of
    > my computer.
    >
    > It looks like RubyGems might be installed, but if so, not in the right
    > directory or possibly not in the path?
    >
    > Anyway I still get file not found after I type gem at the command line.
    >
    > Hope this is not too much for you. Any help would be greatly
    > appreciated. I am dying to get at the applications programming, but
    > this is killing me!


    You need to run the command as root since it writes files to shared
    directories not owned by your user and the ownership of those directories
    should stay as they are.

    $ sudo ruby setup.rb

    A more specific explanation of why is not Ruby specific and could take a bit
    of background to explain so I'll leave that to your future exploration of the
    Unix environment.

    marcel
    --
    Marcel Molina Jr, <>
     
    Marcel Molina Jr., Nov 10, 2005
    #6
  7. Guest

    Thanks a bit of yours and a bit of others and I got the RubyGems
    installed. Now, however when I do gem install Rails or # gem install
    rails --include-dependencies
    # rails /complete/path/to/new/railsapp I get :

    ERROR: While executing gem ... (Errno::EACCES)
    Permission denied - /usr/lib/ruby/gems/1.8/cache/rake-0.6.2.gem

    Can you help me on that :)

    Les
     
    , Nov 10, 2005
    #7
  8. On Fri, Nov 11, 2005 at 08:07:14AM +0900, wrote:
    > Thanks a bit of yours and a bit of others and I got the RubyGems
    > installed. Now, however when I do gem install Rails or # gem install
    > rails --include-dependencies
    > # rails /complete/path/to/new/railsapp I get :
    >
    > ERROR: While executing gem ... (Errno::EACCES)
    > Permission denied - /usr/lib/ruby/gems/1.8/cache/rake-0.6.2.gem
    >
    > Can you help me on that :)


    Same issue. Either become root (with 'su -') and run this command or run it
    with 'sudo' or 'super'.

    $ sudo gem i rails --include-dependencies -r

    marcel
    --
    Marcel Molina Jr. <>
     
    Marcel Molina Jr., Nov 10, 2005
    #8
  9. Guest

    Thanks every1 you were wonderful. Hope to return the favors after I get
    my feet on the ground. See I to learn Unix/Linux!

    Thanks,
    Les
     
    , Nov 10, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. timodheere

    -bash: fop: command not found

    timodheere, Jul 25, 2004, in forum: XML
    Replies:
    1
    Views:
    647
    Patrick TJ McPhee
    Jul 25, 2004
  2. William Park

    (patch for Bash) GTK+2 + Bash

    William Park, Jul 11, 2005, in forum: XML
    Replies:
    3
    Views:
    2,316
    William Park
    Jul 14, 2005
  3. Matt
    Replies:
    4
    Views:
    237
  4. Stephen Bannasch
    Replies:
    10
    Views:
    247
    Ben Bleything
    Nov 21, 2007
  5. Peng Yu
    Replies:
    3
    Views:
    377
    Rainer Weikusat
    May 13, 2013
Loading...

Share This Page