f



Problem with GEM configuration

Hi,

I've ben running Ruby and Gem for a few years without any problems until
now, when this wierd thing poped up.  It's been a while since I ran GEM
so I don't know what may have happened to produce the problem.  However,
now, with most GEM commands I get the following response ...

ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - %UserProfile

I'm running ...
  Windows XP
  Ruby v1.8.6
  Gem v 1.3.6

I do have an environment variable "UserProfile" and equates to a valid
directory and it contains a ".gem" directory.  What does GEM want
"%UserProfile" to be?  How can I fix this?  About the only GEM command
that works is ..
  gem list --local

Thanks
Mike

-- 
Posted via http://www.ruby-forum.com/.

0
zortag (1)
1/25/2011 4:17:41 PM
comp.lang.ruby 48886 articles. 0 followers. Post Follow

3 Replies
3182 Views

Similar Articles

[PageSpeed] 51

On Jan 25, 1:17=A0pm, Michael Mcandrews <zor...@rcn.com> wrote:
> Hi,
>
> I've ben running Ruby and Gem for a few years without any problems until
> now, when this wierd thing poped up. =A0It's been a while since I ran GEM
> so I don't know what may have happened to produce the problem. =A0However=
,
> now, with most GEM commands I get the following response ...
>
> ERROR: =A0While executing gem ... (Errno::ENOENT)
> =A0 =A0 No such file or directory - %UserProfile
>
> I'm running ...
> =A0 Windows XP
> =A0 Ruby v1.8.6
> =A0 Gem v 1.3.6
>
> I do have an environment variable "UserProfile" and equates to a valid
> directory and it contains a ".gem" directory. =A0What does GEM want
> "%UserProfile" to be? =A0How can I fix this? =A0About the only GEM comman=
d
> that works is ..
> =A0 gem list --local
>

can you try "gem env" ?

perhaps you also have a GEM_HOME or GEM_PATH variable setup, so try
this:

set GEM

And tell us the results. There could be a missing % in one of the
environment variables, specially HOME variable (which is used by Ruby
and RubyGems)

--
Luis Lavena
0
Luis
1/25/2011 5:00:14 PM
Thanks for the response.  From "gem env" ...

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.6
  - RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
  - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mswin32-60
  - GEM PATHS:
     - C:/Ruby/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

But I suspect the problem may be in your second request, that is the 
"GEM..." environment variables; I have no "GEM*" environment variables. 
So where should GEM_HOME be pointing to and what should be in GEM_PATH?

Thanks,
Mike

-- 
Posted via http://www.ruby-forum.com/.

0
Michael
1/25/2011 6:01:00 PM
Thanks, problem is now fixed.  It was your last suggestion, that is the 
"HOME" environment variable.  It was messed up, it value was invalid. 
Changing it, fixed the GEM command.  So thats a lot

Mike

-- 
Posted via http://www.ruby-forum.com/.

0
Michael
1/25/2011 6:22:10 PM
Reply: