Where are gem’s executables in Ubuntu?
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.
April 6th, 2010 - 17:25
ads after each article..
You fail
Shitty website for a shitty developer.
April 6th, 2010 - 18:24
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
May 17th, 2010 - 17:55
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.
May 17th, 2010 - 17:56
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
May 17th, 2010 - 18:02
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.