Problem with GEM configuration

M

Michael Mcandrews

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
 
L

Luis Lavena

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

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)
 
M

Michael Mcandrews

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
 
M

Michael Mcandrews

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
 

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
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top