ERROR: While executing gem

Hello, I installed the latest ruby version (1.9.2p290) via the rubyinstaller (exe). I have a Windows 7 64bits. Installation was fine. But I can't update or install my gems. For instance if I enter "gem install rails" I get the following error message :

ERROR: While executing gem... (Errno:EN0ENT) No such file or directory

Can anyone help me ??

Thank you

Please type gem -v

and check whether rubygems exists or not then continue

Yeah right. So I've got the version 1.7.2 of gem. I'm on a Win7 64bit and I run my prompt as administrator.

Yeah right, I've got the version 1.7.2 of gem. I'm on a Win7 64bit and I run my prompt as administrator.

Please give me the display after writting

gem list

what do u get

are u using rvm or something dude? its a wierd....

Enviado via iPad

https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails

Please read the linked threads in that troubleshooting page.

It is most likely due a wrong configuration of the home directory in your system that is pointing to a non-existing location (network drive letter)

He said, that he was using the Ruby installer, so there is no rvm. Also I don’t remember rvm is running with windows.

Anyway, it looks as if there is some version mismatch when I look at the pathes. 1.9.2 is mentioned on the one side, but in the path the gems go into a 1.9.1 dir.

That was nothing to do, see 1.9.2 release FAQ:

http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9.2-released/

"Standard library is installed in /usr/local/lib/ruby/1.9.1 This version is a "library compatible version." Ruby 1.9.2 is almost 1.9.1 compatible, so the library is installed in the 1.9.1 directory."

Please see the link I sent before about checking the "gem env" information to determine if some drive or directory do not exist.

Hello, I tried gem env and I get :

C:\Users\Cédéric>gem env RubyGems Environment:   - RUBYGEMS VERSION: 1.7.2   - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [i386-mingw32]   - INSTALLATION DIRECTORY: C:/Ruby192/lib/ruby/gems/1.9.1   - RUBY EXECUTABLE: C:/Ruby192/bin/ruby.exe   - EXECUTABLE DIRECTORY: C:/Ruby192/bin   - RUBYGEMS PLATFORMS:     - ruby     - x86-mingw32   - GEM PATHS:      - C:/Ruby192/lib/ruby/gems/1.9.1   - GEM CONFIGURATION:      - :update_sources => true      - :verbose => true      - :benchmark => false      - :backtrace => false      - :bulk_threshold => 1000   - REMOTE SOURCES:      - http://rubygems.org/

Any idea ?? Thank you

What are the values of HOMEDRIVE, HOMEPATH, USERPROFILE and HOME environment variables? These affect "gem install". Please do:

SET HOME SET USERPROFILE

And verify the drive and directories mentioned there are valid.

C:\Users\Cédéric>SET HOME HOMEDRIVE=C: HOMEPATH=\Users\Cédéric

C:\Users\Cédéric>SET USERPROFILE USERPROFILE=C:\Users\Cédéric

C:\Users\Cédéric>SET HOMEPATH HOMEPATH=\Users\Cédéric

(Those Path really exist on my computer (they are valid)) ...

Problem is the accented characters in the path, which are not properly translated into ANSI.

C:\Users>ruby -v ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

C:\Users\Luis>chcp 1252 Active code page: 1252

C:\Users\Luis>cd ..

C:\Users>irb irb(main):001:0> Dir.glob("*") => ["All Users", "Cédéric", "Default", "Default User", "desktop.ini", "Luis", "Public"] irb(main):002:0> d = Dir.glob("*")[1] => "Cédéric" irb(main):003:0> d.encoding => #<Encoding:Windows-1252> irb(main):004:0> File.expand_path(d) => "C:/Users/Cédéric" irb(main):005:0> exit

C:\Users>SET FOO=%CD%\Cédéric

C:\Users>irb irb(main):001:0> a = ENV["FOO"] => "C:\\Users\\C\x82d\x82ric" irb(main):002:0> File.expand_path(a) => "C:/Users/C\x82d\x82ric" irb(main):003:0> File.directory?(a) => false irb(main):004:0> exit

Hello,

C:\Users\Cédric>MKDIR C:\Foo

C:\Users\Cédric>SET HOME=C:\Foo

C:\Users\Cédric>gem install ERROR: While executing gem ... (Gem::CommandLineError)     Please specify at least one gem name (e.g. gem build GEMNAME)

... I've tried to install a Win XP Virtual Machine (with VirtualBox), a Ubuntu VM. When I try a gem install rails :I still get that same Errno message ... :frowning:

dude you must say the gem name ex: gem install rails

Enviado via iPad

Hello,

C:\Users\Cédric>MKDIR C:\Foo

C:\Users\Cédric>SET HOME=C:\Foo

C:\Users\Cédric>gem install ERROR: While executing gem ... (Gem::CommandLineError) Please specify at least one gem name (e.g. gem build GEMNAME)

gem install rails

or other name of gem (is required)

... I've tried to install a Win XP Virtual Machine (with VirtualBox), a Ubuntu VM. When I try a gem install rails :I still get that same Errno message ... :frowning:

The problem will persist as long you use a path with accented characters as part of your username.

@ Leoncio Caminha yeah sure I already did what you told me @ Luis :> OK I'll create a new user with no accented caracter then i ll see if it's working (maybe it 's my name Cédric who makes issues hahah :slight_smile: )

YEAHHHHHHHHHHHHHHHHHHHHHHHHHHH it s perfectly working since I created a non accentued username !! The problème was the accent on "Cédric". Thanks so much Luis :wink: