I install one-click Ruby on Vista with default gems. I add ruby
path(c:\ruby\bin;) to the system environment variables. After that I can
check the ruby version from any directory. But I can only check gem
version under c:\ruby\bin. I wonder how I can check gem version from any
directory.
I don't own or have a Vista system to recreate your situation, could
you copy the output you get running "gem env" from outside c:\ruby\bin
folder? also, which version of rubygem you're using will be helpful
too.
Regards,
Luis
···
On Dec 24, 2:01 pm, Li Chen <chen_...@yahoo.com> wrote:
Hi all,
Sorry if this quesione is posted.
I install one-click Ruby on Vista with default gems. I add ruby
path(c:\ruby\bin;) to the system environment variables. After that I can
check the ruby version from any directory. But I can only check gem
version under c:\ruby\bin. I wonder how I can check gem version from any
directory.
I don't own or have a Vista system to recreate your situation, could
you copy the output you get running "gem env" from outside c:\ruby\bin
folder? also, which version of rubygem you're using will be helpful
too.
Regards,
Luis
Hi Luis,
Here is what I get from the prompt window.
Thanks,
Li
###############################################
C:\Users\Alex>gem env
:1: no such file to load -- rubygems (LoadError)
Can you list the contents of c:\ruby\bin\ ?
I'm interested to see if there are other extensions for gem (looking
for .cmd or .bat files) and their contents.
I'm not familiar with the error message you're getting. could you do
the following steps and copy your output?
···
On Dec 24, 3:16 pm, Li Chen <chen_...@yahoo.com> wrote:
Luis Lavena wrote:
,
> I don't own or have a Vista system to recreate your situation, could
> you copy the output you get running "gem env" from outside c:\ruby\bin
> folder? also, which version of rubygem you're using will be helpful
> too.
> Regards,
> Luis
Hi Luis,
Here is what I get from the prompt window.
Thanks,
Li
###############################################
C:\Users\Alex>gem env
:1: no such file to load -- rubygems (LoadError)
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
ECHO.Using 9x command line
@"C:/Ruby/bin/ruby.exe" "gem" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
ECHO.Using NT command line
"%~d0%~p0ruby.exe" "%~d0%~p0%~n0" %*
====
This is my Windows XP output:
C:\Ruby\bin>gem -v
Using NT command line
1.0.1
C:\Documents and Settings\Usuario>gem -v
Using NT command line
1.0.1
Maybe Vista is using '9x' version of command line processing, becasue
the .bat file, but that seems odd, and couldn't reproduce locally, so
the more info you can provide, the better.
Please, look at the first item in your path.... jRuby!
when calling gem, you're actually calling jruby gem.
That's why you don't get "Using NT command line" echo when calling it
outside c:\ruby\bin
Please, remove jruby from the path and try again.
That one of the problems of having multiple interpreters with the same
executables hanging in the path.
Hey, lucky you didn't add ruby 1.9 too!
HTH,
Luis
PS: btw, there are many attempts to add jruby and ruby\bin too, so
please cleanup your path variables -- removing duplicates -- to avoid
future problems again.
···
On 30 dic, 19:44, Li Chen <chen_...@yahoo.com> wrote:
Hi Luis,
Sorry for the late response. I am off line for several days.
I update the gem.bat with the one you give me. I don't think it works
either.
And here is the screen output, together with the ECHO %path%.
Once again thank you very much,
Li
############
C:\Users\Alex>gem -v
:1: no such file to load -- rubygems (LoadError)
C:\>cd ruby\bin
C:\ruby\bin>gem -v
Using NT command line
1.0.1
C:\ruby\bin>c:
C:\ruby\bin>cd\
C:\>gem -v
:1: no such file to load -- rubygems (LoadError)