[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Help with installing gem in my home directory

Vincent Foley

5/6/2005 5:50:00 AM

Hi everyone,

I tried following the instructions
(http://docs.rubygems.org/read/chapter...) 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.

4 Answers

Vincent Foley

5/7/2005 9:21:00 PM

0

Bump. Anyone can help me out? Thanks.

Chad Fowler

5/9/2005 11:42:00 AM

0

On 5/6/05, Vincent Foley <vfoley@gmail.com> wrote:
> Hi everyone,
>
> I tried following the instructions
> (http://docs.rubygems.org/read/chapter...) 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://chad...
http://rubyc...
http://ruby...
http://rubygems.rub... (over 300,000 gems served!)



Vincent Foley

5/9/2005 3:05:00 PM

0

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

Chad Fowler

5/10/2005 11:44:00 AM

0

On 5/9/05, Vincent Foley <vfoley@gmail.com> wrote:
> No I haven't. I thought I didn't need to because it was specified in
> ..gemrc.
>
>

Oh, my mistake. Sorry.

I'm not sure what could be wrong. I just used the same .gemrc (except
I changed the username) and was able to install and use breakpoint and
several other gems.

hmmmm...what to look for next?

--

Chad Fowler
http://chad...
http://rubyc...
http://ruby...
http://rubygems.rub... (over 300,000 gems served!)