Jesús Dugarte
2010-Apr-09 20:48 UTC
gem install rails (Errno::ENOENT) No such file or directory
I have two PCs, one with Windows XP and another with Windows Vista. I''m working as an administrator in both computers. I''m using Ruby 1.8.7 and Rubygems 1.3.6. When I try to install Rails I get this error: C:\>gem install rails ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - C:/Users/Jesús Dugarte I have installed Rails several times before (although I haven''t done it in about a year), and I''d never had this problem before. Has anything changed in the installation? I''ve found several cases similar to mine in internet, but none of the proposed solutions works for me. Thanks, Jesús Dugarte.- -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Anthony Crumley
2010-Apr-10 06:29 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
Jesús, Have you tried installing ruby into a directory path that does not have any spaces in it? Anthony Crumley http://commonthread.com On Fri, Apr 9, 2010 at 3:48 PM, Jesús Dugarte <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have two PCs, one with Windows XP and another with Windows Vista. I''m > working as an administrator in both computers. I''m using Ruby 1.8.7 and > Rubygems 1.3.6. When I try to install Rails I get this error: > > C:\>gem install rails > ERROR: While executing gem ... (Errno::ENOENT) > No such file or directory - C:/Users/Jesús Dugarte > > I have installed Rails several times before (although I haven''t done it > in about a year), and I''d never had this problem before. Has anything > changed in the installation? I''ve found several cases similar to mine in > internet, but none of the proposed solutions works for me. > > Thanks, > > Jesús Dugarte.- > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rahul Mehta
2010-Apr-10 09:03 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
1) Go to http://rubyonrails.org/download that is official download page for ruby on rails. 2) First download ruby. For windows it is one click installer package just download it and double click it and follow installation wizard. 3) Download ruby gems from same page, extract it and then run ruby setup.rb, just double click it. 4) To install rails type “gem install rails” in terminal, it will automatically install rails for you. On Apr 10, 1:48 am, Jesús Dugarte <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have two PCs, one with Windows XP and another with Windows Vista. I''m > working as an administrator in both computers. I''m using Ruby 1.8.7 and > Rubygems 1.3.6. When I try to install Rails I get this error: > > C:\>gem install rails > ERROR: While executing gem ... (Errno::ENOENT) > No such file or directory - C:/Users/Jesús Dugarte > > I have installed Rails several times before (although I haven''t done it > in about a year), and I''d never had this problem before. Has anything > changed in the installation? I''ve found several cases similar to mine in > internet, but none of the proposed solutions works for me. > > Thanks, > > Jesús Dugarte.- > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Morris
2010-Apr-11 05:06 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
Try running Sysinternals Process Monitor and look for file system activity around the time the error occurs. Could give more details on why ruby can''t see that folder. (What''s the error msg on XP? That msg looks Vista specific). On Fri, Apr 9, 2010 at 3:48 PM, Jesús Dugarte <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have two PCs, one with Windows XP and another with Windows Vista. I''m > working as an administrator in both computers. I''m using Ruby 1.8.7 and > Rubygems 1.3.6. When I try to install Rails I get this error: > > C:\>gem install rails > ERROR: While executing gem ... (Errno::ENOENT) > No such file or directory - C:/Users/Jesús Dugarte > > I have installed Rails several times before (although I haven''t done it > in about a year), and I''d never had this problem before. Has anything > changed in the installation? I''ve found several cases similar to mine in > internet, but none of the proposed solutions works for me. > > Thanks, > > Jesús Dugarte.- > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Chris http://improvingenterprises.com http://clabs.org -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jesús Dugarte
2010-Apr-12 18:25 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
Anthony Crumley wrote:> Jesús, > > Have you tried installing ruby into a directory path that does not have > any > spaces in it? > > Anthony Crumley > http://commonthread.comRuby is actually installed in the default directory, C:\Ruby, without spaces o any other special character. And I don''t have any problem installing Ruby. It''s Rails that I''m having problems with. Jesús Dugarte.- -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jesús Dugarte
2010-Apr-12 18:26 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
Rahul Mehta wrote:> 1) Go to http://rubyonrails.org/download that is official download > page for ruby on rails. > > 2) First download ruby. For windows it is one click installer > package just download it and double click it and follow installation > wizard. > > 3) Download ruby gems from same page, extract it and then run ruby > setup.rb, just double click it. > > 4) To install rails type �gem install rails� in terminal, it will > automatically install rails for you.Yes, that''s exactly what I did, and exactly what I''ve done many times in the past, but this time it won''t let me install Rails when I do "gem install rails" Jesús Dugarte.- -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jesús Dugarte
2010-Apr-12 19:28 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
Chris Morris wrote:> Try running Sysinternals Process Monitor and look for file system > activity > around the time the error occurs. Could give more details on why ruby > can''t > see that folder. (What''s the error msg on XP? That msg looks Vista > specific). > > On Fri, Apr 9, 2010 at 3:48 PM, Jesús Dugarte <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > wrote: > >> changed in the installation? I''ve found several cases similar to mine in >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > > -- > Chris > http://improvingenterprises.com > http://clabs.orgThe error message in XP is exactly the same, with the exception of the directory ("Documents and Settings" instead of "Users"). I''m going to try with Sysinternals Process Monitor to see what I can find out. Thanks, Jesús Dugarte.- -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jesús Dugarte
2010-Apr-12 20:07 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
Jesús Dugarte wrote:> I have two PCs, one with Windows XP and another with Windows Vista. I''m > working as an administrator in both computers. I''m using Ruby 1.8.7 and > Rubygems 1.3.6. When I try to install Rails I get this error: > > C:\>gem install rails > ERROR: While executing gem ... (Errno::ENOENT) > No such file or directory - C:/Users/Jesús Dugarte > > I have installed Rails several times before (although I haven''t done it > in about a year), and I''d never had this problem before. Has anything > changed in the installation? I''ve found several cases similar to mine in > internet, but none of the proposed solutions works for me. > > Thanks, > > Jesús Dugarte.-Using this http://stackoverflow.com/questions/849660/how-to-stop-the-gem-utility-from-accessing-my-home-directory as a base, I manage to make it work. My gem.bat looks like this now: @ECHO OFF SET _HOMEPATH=%HOMEPATH% SET HOMEPATH=\Ruby IF NOT "%~f0" == "~f0" GOTO :WinNT @"ruby.exe" "C:\Ruby\bin\gem" %1 %2 %3 %4 %5 %6 %7 %8 %9 GOTO :EOF :WinNT @"ruby.exe" "%~dpn0" %* :EOF SET HOMEPATH=%_HOMEPATH% Although I''m now wondering if there will be any unexpected consequence of having the .gem directory inside the ruby directory (C:\Ruby) and not where it used to be (C:\Users\Jesús Dugarte). Thanks, Jesús Dugarte.- -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Nikolay Kotlyarov
2010-Apr-15 21:10 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
The error appears because of Gem#find_home(rubygems.rb line 498) method not working with unicode characters which can be present in your homedir path(and in your case they definitely are). That method reads the followig environment variables: ''HOME'', ''USERPROFILE'', [''HOMEDRIVE''+''HOMEPATH'']. This homepath is used to define @update_cache variable(spec_fetcher.rb line 46): @update_cache = File.stat(Gem.user_home).uid == Process.uid with related consequences. I think you should reset your gem.bat to default and only use your version when needed. Also you can just undefine HOMEPATH environment variable before using gem utility: (windows -- Start->Run->cmd) set HOMEPATHgem install <somegem> <...> After closing cmd-session this variable would be set to default automatically. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jesús Dugarte
2010-Apr-15 21:29 UTC
Re: gem install rails (Errno::ENOENT) No such file or directory
Nikolay Kotlyarov wrote:> The error appears because of Gem#find_home(rubygems.rb line 498) method > not working with unicode characters which can be present in your homedir > path(and in your case they definitely are). > That method reads the followig environment variables: ''HOME'', > ''USERPROFILE'', [''HOMEDRIVE''+''HOMEPATH'']. > > This homepath is used to define @update_cache variable(spec_fetcher.rb > line 46): > @update_cache = File.stat(Gem.user_home).uid == Process.uid > with related consequences. > > I think you should reset your gem.bat to default and only use your > version when needed. > > Also you can just undefine HOMEPATH environment variable before using > gem utility: > (windows -- Start->Run->cmd) > set HOMEPATH> gem install <somegem> > <...> > After closing cmd-session this variable would be set to default > automatically.Thank you, Nikolay, for the detailed explanation. I created a mygem.bat with my version, to use it in case the regular gem.bat doesn''t work. I hope this won''t get me in any more troubles ;-) Jesús Dugarte.- -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.