# Gem Path remove

**URL:** <https://rubytalk.org/t/gem-path-remove/57635>\
**Category:** ruby-talk\
**Created:** [3 March 2010 11:27 UTC](https://rubytalk.org/t/gem-path-remove/57635 "2010-03-03T11:27:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrei\_Caragea](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@Andrei\_Caragea](https://rubytalk.org/u/Andrei_Caragea)\
**Post date:** [3 March 2010 11:27 UTC](https://rubytalk.org/t/gem-path-remove/57635/1 "2010-03-03T11:27:02Z")

</div>

Hello Everyone,

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

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

C:\\>gem env  
RubyGems Environment:  
&nbsp;&nbsp;- RUBYGEMS VERSION: 1.3.1  
&nbsp;&nbsp;- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]  
&nbsp;&nbsp;- INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8  
&nbsp;&nbsp;- RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe  
&nbsp;&nbsp;- EXECUTABLE DIRECTORY: C:/Ruby/bin  
&nbsp;&nbsp;- RUBYGEMS PLATFORMS:  
&nbsp;&nbsp;&nbsp;&nbsp;- ruby  
&nbsp;&nbsp;&nbsp;&nbsp;- x86-mswin32-60  
&nbsp;&nbsp;- GEM PATHS:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- C:/Ruby/lib/ruby/gems/1.8  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Z:/.gem/ruby/1.8  
&nbsp;&nbsp;- GEM CONFIGURATION:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :update\_sources =\> true  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :verbose =\> true  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :benchmark =\> false  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :backtrace =\> false  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :bulk\_threshold =\> 1000  
&nbsp;&nbsp;- REMOTE SOURCES:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- [http://gems.rubyforge.org/](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.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Luis\_Lavena1](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Lavena1](https://rubytalk.org/u/Luis_Lavena1)\
**Post date:** [3 March 2010 12:38 UTC](https://rubytalk.org/t/gem-path-remove/57635/2 "2010-03-03T12:38:46Z")

</div>

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](http://rubyforge.org/forum/forum.php?forum_id=36423)

> **···**
>
> On Mar 3, 12:27 pm, Andrei Caragea \<dracoola4u2...@yahoo.com\> wrote:
> 
> > 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/](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.
> 
> --  
> Luis Lavena

---

<div class="post-metadata">

**Author:** ![Andrei\_Caragea](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@Andrei\_Caragea](https://rubytalk.org/u/Andrei_Caragea)\
**Post date:** [5 March 2010 11:02 UTC](https://rubytalk.org/t/gem-path-remove/57635/3 "2010-03-05T11:02:10Z")

</div>

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.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Stefan\_Link](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Stefan\_Link](https://rubytalk.org/u/Stefan_Link)\
**Post date:** [25 April 2010 20:15 UTC](https://rubytalk.org/t/gem-path-remove/57635/4 "2010-04-25T20:15:41Z")

</div>

Andrei Caragea wrote:

> 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:  
&nbsp;&nbsp;- RUBYGEMS VERSION: 1.3.5  
&nbsp;&nbsp;- RUBY VERSION: 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]  
&nbsp;&nbsp;- INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8  
&nbsp;&nbsp;- RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe  
&nbsp;&nbsp;- EXECUTABLE DIRECTORY: C:/Ruby/bin  
&nbsp;&nbsp;- RUBYGEMS PLATFORMS:  
&nbsp;&nbsp;&nbsp;&nbsp;- ruby  
&nbsp;&nbsp;&nbsp;&nbsp;- x86-mingw32  
&nbsp;&nbsp;- GEM PATHS:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- C:/Ruby/lib/ruby/gems/1.8  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- U:/.gem/ruby/1.8  
&nbsp;&nbsp;- GEM CONFIGURATION:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :update\_sources =\> true  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :verbose =\> true  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :benchmark =\> false  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :backtrace =\> false  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- :bulk\_threshold =\> 1000  
&nbsp;&nbsp;- REMOTE SOURCES:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- [http://gems.rubyforge.org/](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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
