# Gem question on hosted service

**URL:** <https://www.ruby-forum.com/t/gem-question-on-hosted-service/143400>\
**Category:** Rails\
**Created:** [July 18, 2008, 3:06am UTC](https://www.ruby-forum.com/t/gem-question-on-hosted-service/143400 "2008-07-18T03:06:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tubahead](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@Tubahead](https://www.ruby-forum.com/u/Tubahead)\
**Post date:** [July 18, 2008, 3:06am UTC](https://www.ruby-forum.com/t/gem-question-on-hosted-service/143400/1 "2008-07-18T03:06:00Z")

</div>

All,

This may be a gem question (not rails) but I feel sure someone else on  
this list has seen this issue go by. I use a hosting service that has  
ROR available, but I am among the few developers using it. I am  
developing on a local linux box, and have been very careful to NOT use  
any extra gems because I might have a problem with my provider.

Well … fastercsv rocks and I wanted to use it.

My provider has a method for me to install a gem, and I did so with  
their interface (Fansastico).

My issue:  
require ‘fastercsv’ does not work, and I think it’s because they put  
gems in a place where ruby/rails can’t seem to find them. This is the  
message given when I look at my installed gems:

Using Your Ruby Gem(s)

You will need to add /home/user1/ruby/gems to the include path.  
You can do this by adding the following code to your script:

$:.push("/home/user1/ruby/gems")

I have placed this code in the environment.rb file, and in a couple of  
other locations that I thought might help with no success.

Is there a way to require a gem from a strange location, or do I need  
to add something to my path or environment variables to help ruby  
figure out where these are stored?

Any help is much appreciated …

Dustin

---

<div class="post-metadata">

**Author:** ![Tubahead](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@Tubahead](https://www.ruby-forum.com/u/Tubahead)\
**Post date:** [July 18, 2008, 3:17am UTC](https://www.ruby-forum.com/t/gem-question-on-hosted-service/143400/2 "2008-07-18T03:17:42Z")

</div>

Things I tried:

ENV[‘GEM\_PATH’] ||= ‘/home/salgba/ruby/gems’

or

config.load\_paths += %W( /home/salgba/ruby/gems/gems )

or

$:.push("/home/salgba/ruby/gems")  
require ‘fastercsv’

(all these result in rails failing to start)

---

<div class="post-metadata">

**Author:** ![Tubahead](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@Tubahead](https://www.ruby-forum.com/u/Tubahead)\
**Post date:** [July 18, 2008, 3:19am UTC](https://www.ruby-forum.com/t/gem-question-on-hosted-service/143400/3 "2008-07-18T03:19:27Z")

</div>

Things I tried:

ENV[‘GEM\_PATH’] ||= ‘/home/user1/ruby/gems’

or

config.load\_paths += %W( /home/user1/ruby/gems/gems )

or

$:.push(“/home/user1/ruby/gems”)  
require ‘fastercsv’

(all these result in rails failing to start)

On Jul 17, 9:05 pm, Tubahead [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

---

<div class="post-metadata">

**Author:** ![Tubahead](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@Tubahead](https://www.ruby-forum.com/u/Tubahead)\
**Post date:** [July 19, 2008, 1:36am UTC](https://www.ruby-forum.com/t/gem-question-on-hosted-service/143400/4 "2008-07-19T01:36:29Z")

</div>

On 18 Jul 2008, at 02:17, Tubahead wrote:

> Things I tried:
> 
> ENV[‘GEM\_PATH’] ||= ‘/home/salgba/ruby/gems’

Something along the lines of this one feels like the right thing. What  
happens when you do this?

Fred

---

<div class="post-metadata">

**Author:** ![Tubahead](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@Tubahead](https://www.ruby-forum.com/u/Tubahead)\
**Post date:** [July 23, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/gem-question-on-hosted-service/143400/5 "2008-07-23T21:49:43Z")

</div>

Tried it, still doesn’t make a difference.  
I guess I can attempt support at my hosting company, but I think I am  
one of a few customers using rails, so I may be back here soon.

Thanks for your help !!

On Jul 18, 7:35 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
