How to run applications installed by gem

gadelat's Avatar


02 Oct, 2011 08:05 PM

I tried to install with gem several ruby applications, but i was unable to run them. How to do it? No manual/guide says how, so i think it should be standard - by typing it's name to terminal. Unfortunately that does not work. I'm using Ubuntu 10.04 x64.
Some output how i do it and what result i get:

`$ sudo gem install flvedit Successfully installed flvedit-0.7.4
1 gem installed
$ flvedit flvedit: command not found
$ gem list flvedit


flvedit (0.7.4)`

`$ sudo gem install elo Successfully installed elo-0.1.0
1 gem installed
$ elo No command 'elo' found, did you mean:
Command 'elk' from package 'elk' (universe) Command 'delo' from package 'delo' (universe) Command 'el' from package 'oneliner-el' (universe) elo: command not found
$ gem list elo


elo (0.1.0)`

  1. 1 Posted by Luis Lavena on 02 Oct, 2011 09:56 PM

    Luis Lavena's Avatar


    1. Please ensure that the path the gems were installed is in your PATH.
    2. INSTALLATION DIRECTORY should be included in it.
    3. Provide the output of gem env so we can assist you better.
  2. 2 Posted by gadelat on 03 Oct, 2011 07:43 AM

    gadelat's Avatar
    $ gem env
    RubyGems Environment:
      - RUBYGEMS VERSION: 1.3.7
      - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
      - INSTALLATION DIRECTORY: /var/lib/gems/1.8
      - RUBY EXECUTABLE: /usr/bin/ruby1.8
      - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
        - ruby
        - x86_64-linux
      - GEM PATHS:
         - /var/lib/gems/1.8
         - /home/gadelat/.gem/ruby/1.8
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000

    I found executable of flvedit in /var/lib/gems/1.8/bin/ , but not elo. I installed also shellcast for check and it also appeared in same folder, but it starts with errors. Can this cause problems (wrong paths or so)?

  3. 3 Posted by Luis Lavena on 03 Oct, 2011 11:58 AM

    Luis Lavena's Avatar

    This indicated you're using an ubuntu-provided Ruby + RubyGems, which means the gems are installed in /var/lib/gems/1.8/bin

    Please check if PATH has /var/lib/gems/1.8/bin doing echo $PATH, most likely, it doesn't.

    You will need to update your .bashrc, .profile or .bash_profile *depending on your distro of linux or existing files in your home directory) to include the path, something like:

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

    At the bottom of it

    Hope that helps.

  4. Luis Lavena closed this discussion on 03 Oct, 2011 11:58 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac