As you might know, I’m always working on new projects to automate my work. Call me lazy, call me smart, but the true is that I actually enjoy programming, and if helps making my life easier, it is more than welcomed ;)

Whenever I do a new gem I try to test it on as many platforms as I can.  OSX is the default development platform so usually they always work there, then I try on Gentoo, Fedora, Windows and Ubuntu.

I usually run into problems when I have to find where does Ubuntu saves the gem files and binaries. Yes, you will search pretty much everywhere but you won’t remember where the hell they are.

Since I got tired of searching every time I test something on an ubuntu VM, here is a short how-to so I won’t have to search next time.

Google Search: “can’t find gem executables in ubuntu”

or
$ sudo gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/USER/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com

As it is shown above, my Ubuntu installation saves all installed gems in  ~/.gems or /var/lib/gems/1.8. Once you have the path, all you have to do is add them to your shell rc file.

In the case you use bash or zsh:

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

or, if you already have a PATH like i do just add it to the declaration

PATH=/usr/bin:......:/var/lib/gems/1.8/bin

re open your shell and EUREKA, all your gem’s executable are now in your path.

 

5 Responses to Where are gem’s executables in Ubuntu?

  1. meemo says:

    ads after each article..
    You fail
    Shitty website for a shitty developer.

  2. FreedomCoder says:

    You might be right. I honestly do not like Ads myself and sometimes I even block them with extensions ( I think you should do the same) .

    On the other side, I have to pay for hosting for this and other websites. if I make a buck with a small ad after the post ( not in between or anything that tries to cheat users ), I think it will help pay for my website. If you think trying to make a living by getting pay for what you do is wrong, well you should tell your employeer not to pay you since you would love to work for free. :)

    With regards to the shitty developer part , well yes, I’m not a developer, so if I even get be a shitty one I’m happy :)

    Cheers

  3. l3nox says:

    Hi,

    I cannot correctly install Esearchy on Backtrack 4. There is a sizeable group of people which have the same problem. Whether it is possible to ask for some HOWTO???

    Best Regards

    [WORDPRESS HASHCASH] The poster sent us ’0 which is not a hashcash value.

  4. l3nox says:

    Hi,

    I cannot correctly install Esearchy on Backtrack 4. There is a sizeable group of people which have the same problem. Whether it is possible to ask for some HOWTO???

    Best Regards

    • FreedomCoder says:

      OK. Let me try to go and install it myself and i’ll do a quick how-to post. :)

      [WORDPRESS HASHCASH] The poster sent us ’0 which is not a hashcash value.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>