Gem Path remove

A

Andrei Caragea

Hello Everyone,

I'm having trouble installing gems because of a gem path.

C:\>gem install watir
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - Z:/.gem

C:\>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.1
- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [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
- Z:/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/

In my GEM PATHS theres Z:/.gem/ruby/1.8

Can anyone tell me how to remove that path? because that is a network
drive to which I will never have write access.

Thank you.
 
L

Luis Lavena

Hello Everyone,

I'm having trouble installing gems because of a gem path.

C:\>gem install watir
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - Z:/.gem

C:\>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [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
     - Z:/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     -http://gems.rubyforge.org/

In my GEM PATHS theres Z:/.gem/ruby/1.8

Can anyone tell me how to remove that path? because that is a network
drive to which I will never have write access.

Looks like your home or profile directory is Z:, check with this:

ruby -v -e "puts File.expand_path('~')"

You can force a location for gem installation using GEM_PATH and
GEM_HOME environment variables.

RubyGems seems using Z: because it may not have write permissions to
C:/Ruby

Did you or our Administrator install it? If so, would recommend talk
to him and install Ruby "as user" instead.

A newer version of an Installer for Windows has been made available a
few weeks ago. I highly recommend the switch to it:

http://rubyforge.org/forum/forum.php?forum_id=36423
 
A

Andrei Caragea

It was I who installed ruby and it worked just fine until 2 days ago.

I tried with GEM_PATH and GEM_HOME before posting, but I think I was
doing something wrong because it did not work. I have reinstalled ruby,
I still have the Z in my path but now it's linked to my network folder.

Instead of Z:/.gem/ruby/1.8 I have Z:/<network_folder>/.gem/ruby/1.8

this works now.
 
S

Stefan Link

Andrei said:
It was I who installed ruby and it worked just fine until 2 days ago.

I tried with GEM_PATH and GEM_HOME before posting, but I think I was
doing something wrong because it did not work. I have reinstalled ruby,
I still have the Z in my path but now it's linked to my network folder.

Instead of Z:/.gem/ruby/1.8 I have Z:/<network_folder>/.gem/ruby/1.8

this works now.

Hi folks,

I still have just the same issue here. I am using the windows installer
and after doing so, gem env tells me this:

RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
- 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-mingw32
- GEM PATHS:
- C:/Ruby/lib/ruby/gems/1.8
- U:/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/

OR

ruby -v -e "puts File.expand_path('~')"
--> U:/

My problem is, that U: is a network folder which is not accessible if I
want to work offline in the train or whatever.

So how can I tell gems not to use U:?

Thanks a lot!
Tem
 

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,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top