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

On Jan 25, 1:17pm, Michael M. [email protected] wrote:

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

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)

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

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:

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