Help with installing gem in my home directory

V

Vincent Foley

Hi everyone,

I tried following the instructions
(http://docs.rubygems.org/read/chapter/11#page56) on how to install
gems in a custom directory, and while they do get installed in that
directory, I cannot use them. For example, I install ruby-breakpoint,
and when I came to use it in IRB, it complained that the library could
not be found:

[vince@macvince: ~/prog/ruby/rjournal]% irb -r rubygems
irb(main):001:0> require "breakpoint"
LoadError: No such file to load -- breakpoint
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
from (irb):1
irb(main):002:0>

I had also loaded Rake, and I got a similar message when I came to run
it:

[vince@macvince: ~/prog/ruby/rjournal]% rake test
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:194:in
`report_activate_error': Could not find RubyGem rake (> 0)
(Gem::LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:136:in
`activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:37:in
`require_gem_with_options'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:31:in
`require_gem'
from /Users/vince/.gems/bin/rake:17

The config file I used looked like this:
gem: --remote
gemhome: /Users/vince/.gems
gempath:
- /usr/local/lib/ruby/gems/1.8

Is there anything wrong with it? Am I forgetting something? Thanks
for you help everyone.

Vincent.
 
C

Chad Fowler

Hi everyone,

I tried following the instructions
(http://docs.rubygems.org/read/chapter/11#page56) on how to install
gems in a custom directory, and while they do get installed in that
directory, I cannot use them. For example, I install ruby-breakpoint,
and when I came to use it in IRB, it complained that the library could
not be found:

[vince@macvince: ~/prog/ruby/rjournal]% irb -r rubygems
irb(main):001:0> require "breakpoint"
LoadError: No such file to load -- breakpoint
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
from (irb):1
irb(main):002:0>

I had also loaded Rake, and I got a similar message when I came to run
it:

[vince@macvince: ~/prog/ruby/rjournal]% rake test
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:194:in
`report_activate_error': Could not find RubyGem rake (> 0)
(Gem::LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:136:in
`activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:37:in
`require_gem_with_options'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:31:in
`require_gem'
from /Users/vince/.gems/bin/rake:17

The config file I used looked like this:
gem: --remote
gemhome: /Users/vince/.gems
gempath:
- /usr/local/lib/ruby/gems/1.8

Is there anything wrong with it? Am I forgetting something? Thanks
for you help everyone.

Vincent.

Vincent, did you set the GEM_PATH environment variable?

--

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 300,000 gems served!)
 
V

Vincent Foley

No I haven't. I thought I didn't need to because it was specified in
..gemrc.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,315
Members
48,000
Latest member
SusannahSt

Latest Threads

Top