On Jun 4, 7:57=A0pm, Le Couey <LeCo... / sfcn.org> wrote:
>
> Luis,
>
> Thanks!
>
> Everything appears to have worked (see following):
>
> C:\Documents and Settings\Lawrence>gem env
> RubyGems Environment:
> =A0 - RUBYGEMS VERSION: 1.8.4
> =A0 - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i386-mingw32]
> =A0 - INSTALLATION DIRECTORY: C:/lan/Ruby192/lib/ruby/gems/1.9.1
> =A0 - RUBY EXECUTABLE: C:/lan/Ruby192/bin/ruby.exe
> =A0 - EXECUTABLE DIRECTORY: C:/lan/Ruby192/bin
> =A0 - RUBYGEMS PLATFORMS:
> =A0 =A0 - ruby
> =A0 =A0 - x86-mingw32
> =A0 - GEM PATHS:
> =A0 =A0 =A0- C:/lan/Ruby192/lib/ruby/gems/1.9.1
> =A0 - GEM CONFIGURATION:
> =A0 =A0 =A0- :update_sources =3D> true
> =A0 =A0 =A0- :verbose =3D> true
> =A0 =A0 =A0- :benchmark =3D> false
> =A0 =A0 =A0- :backtrace =3D> false
> =A0 =A0 =A0- :bulk_threshold =3D> 1000
> =A0 - REMOTE SOURCES:
> =A0 =A0 =A0-http://rubygems.org/
>
> --- 8< -------------------------- 8< --------------------------- 8<
> ----------------------
> C:\Documents and Settings\Lawrence>set home
> HOME=3DC:\%HOMEPATH%
> HOMEDRIVE=3DC:
> HOMEPATH=3D\Documents and Settings\Lawrence
>
> C:\Documents and Settings\Lawrence>echo '%HOME%'
> 'C:\%HOMEPATH%'
>
>
> --- 8< -------------------------- 8< --------------------------- 8<
> ----------------------
> C:\Documents and Settings\Lawrence>set HOME=3D%HOMEDRIVE%%HOMEPATH%
>
> C:\Documents and Settings\Lawrence>SET HOME
> HOME=3DC:\Documents and Settings\Lawrence
> HOMEDRIVE=3DC:
> HOMEPATH=3D\Documents and Settings\Lawrence
>
> C:\Documents and Settings\Lawrence>ruby -ve "puts File.expand_path('~')"
> ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
> C:/Documents and Settings/Lawrence

The problem is here, seems HOME is not properly evaluated... perhaps
%HOMEPATH% was escaped from evaluation.

You need to setup HOME properly, which I recommend you use SETX:

http://ss64.com/nt/setx.html

SETX HOME ^%HOMEDRIVE^%^%HOMEPATH^%

The ^ around % will delay evaluation of the variable.

For the setting changes to work, you need to open a new terminal.

--
Luis Lavena