Results 1 to 3 of 3

Thread: sudoing ruby gem binaries on gutsy failing

  1. #1
    Join Date
    Dec 2006
    Beans
    11

    Angry sudoing ruby gem binaries on gutsy failing

    hi all,

    i'm running gutsy and have the rubygems package installed. if i try to 'sudo rake blah', or for that matter 'sudo cmd args', where cmd is any program under /var/lib/gems/1.8/bin i get 'sudo: rake: command not found'. if i say 'sudo echo $PATH' i get '~/bin:/var/lib/gems/1.8/bin:blah/blah/blah'

    so what's up? any ideas? where is the global path set in gutsy?

    thanks,
    _c

  2. #2
    Join Date
    May 2005
    Beans
    366

    Re: sudoing ruby gem binaries on gutsy failing

    a better test is to create a shell script like
    Code:
    #!/bin/sh
    echo $PATH
    Run that as sudo and you'll see that the path doesn't include the gems. I beleive changing the path is considered a security feature, for why see http://www.kramse.dk/projects/unix/s...script_en.html. You can alter the path for all bash shells through /etc/bash.bashrc. I'm not certain this is the best way.

  3. #3
    Join Date
    Dec 2006
    Beans
    11

    Re: sudoing ruby gem binaries on gutsy failing

    hi thanks,

    i tried that, i put

    export PATH="$PATH:/var/lib/gems/1.8/bin/"

    in /etc/bash.bashrc at the bottom of the file. logged out an back in and still when i run the script you indicated, it does not include my new path.

    any ideas?

    thanks,
    _c

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •