# Rubgems in user directory - HELP!

**URL:** <https://www.ruby-forum.com/t/rubgems-in-user-directory-help/84472>\
**Category:** Rails\
**Created:** [February 5, 2007, 1:50am UTC](https://www.ruby-forum.com/t/rubgems-in-user-directory-help/84472 "2007-02-05T01:50:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [February 5, 2007, 1:50am UTC](https://www.ruby-forum.com/t/rubgems-in-user-directory-help/84472/1 "2007-02-05T01:50:34Z")

</div>

I’m trying to install ruby on rails to a host server that I don’t have  
root access to. The server already has ruby.

I’ve followed the info on these two pages for installing rubygems in a  
non-root user directory:  
[http://rubygems.org/read/chapter/3](http://rubygems.org/read/chapter/3)  
[http://wiki.rubyonrails.com/rails/pages/HowToUseMultipleGemRepositories](http://wiki.rubyonrails.com/rails/pages/HowToUseMultipleGemRepositories)

rubygems appears to be installed correctly but when I do “gem install  
rails” I get this error:

ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)  
Permission denied - connect(2)(Errno::EACCES)

I’ve changed my $PATH to include the gem installation dir, I have my  
$RUBYLIB set to /home/geminstall/lib/ruby/site\_ruby/1.8, and have set  
the $GEM\_HOME path to my gem repository.

is it possible to be completely unable to install ROR on a hosting  
company server because of lack of permissions? or am I missing  
something?

please help!

---

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [February 5, 2007, 2:06am UTC](https://www.ruby-forum.com/t/rubgems-in-user-directory-help/84472/2 "2007-02-05T02:06:36Z")

</div>

If you just need a different version of rails than your host provides  
you  
are better off to just install rails (or freeze it) into your  
application’s  
vendor/rails directory.

It is possible to get your own version of Rubygems up and running on a  
shared host. Here’s what I did on Textdrive a while back.  
[http://www.stevelongdo.com/articles/2006/08/31/installing-a-patched-rubygems-on-textdrive](http://www.stevelongdo.com/articles/2006/08/31/installing-a-patched-rubygems-on-textdrive)

On 2/4/07, james [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> rubygems appears to be installed correctly but when I do "gem install  
> company server because of lack of permissions? or am I missing  
> something?
> 
> please help!
> 
> >

–  
Thanks,  
-Steve  
[http://www.stevelongdo.com](http://www.stevelongdo.com)

---

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [February 5, 2007, 2:20am UTC](https://www.ruby-forum.com/t/rubgems-in-user-directory-help/84472/3 "2007-02-05T02:20:39Z")

</div>

actually, the host ([aplus.net](http://aplus.net)) has no rails or rubygems installed,  
only ruby, and I don’t have access to it’s dir (and the host offers no  
help or support for installing ror)

I’m limited to my /home/myusername level

I was getting the typical:  
…/bin/gem:9:in `require’: no such file to load – rubygems  
(LoadError)

when trying to do “gem install rails”, until I set the RUBYLIB path  
to /home/geminstall/lib/ruby/site\_ruby/1.8 and now I’m getting this  
strange error:

ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)  
Permission denied - connect(2)(Errno::EACCES)

which I can’t seem to find anyone else getting in this situation. I  
can’t seem to get past this point.

---

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [February 5, 2007, 2:27am UTC](https://www.ruby-forum.com/t/rubgems-in-user-directory-help/84472/4 "2007-02-05T02:27:39Z")

</div>

ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)

> ```
> Permission denied - connect(2)(Errno::EACCES)
> 
> ```

I would imagine that you are unable to connect to the gemserver either  
because of permissions or some sort of network/firewall configuration on  
the  
host.

Fortunately you can copy the gems from your local repository up to the  
rubygems that you have installed on your hosting provider.

On 2/4/07, james [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> (LoadError)
> 
> > > I’m trying to install ruby on rails to a host server that I don’t have  
> > > ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)  
> > > please help!
> > 
> > –  
> > Thanks,  
> > -Stevehttp://www.stevelongdo.com
> 
> >

–  
Thanks,  
-Steve  
[http://www.stevelongdo.com](http://www.stevelongdo.com)

---

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [February 5, 2007, 2:34am UTC](https://www.ruby-forum.com/t/rubgems-in-user-directory-help/84472/5 "2007-02-05T02:34:39Z")

</div>

that’s a good point, I’ll just try copy my gems from my hard drive.

thanks Steve!
