# Installing Gems

**URL:** <https://discuss.rubyonrails.org/t/installing-gems/37889>\
**Category:** rubyonrails-talk\
**Created:** [January 2, 2009, 4:07pm UTC](https://discuss.rubyonrails.org/t/installing-gems/37889 "2009-01-02T16:07:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Pratap](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Abhishek\_Pratap](https://discuss.rubyonrails.org/u/Abhishek_Pratap)\
**Post date:** [January 2, 2009, 4:07pm UTC](https://discuss.rubyonrails.org/t/installing-gems/37889/1 "2009-01-02T16:07:57Z")

</div>

Hi All

Getting stuck at the first step with gems. I guess a tough start but hoping for a easy future.

So here I am.

I did install Gems in the separate /export directory of my Red Hat system.

ruby setup.rb --prefix=/export --destdir=/export

Now trying to install rails and its dependencies I see this error. Possibly becoz I am not installing it in the central area as I our admin policies dont allow it do.

gem install rails /export/bin/gem:8:in `require': no such file to load -- rubygems (LoadError) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /export/bin/gem:8

Thanks and excuse me if this sounds too silly 🙂-Abhi

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [January 2, 2009, 4:43pm UTC](https://discuss.rubyonrails.org/t/installing-gems/37889/2 "2009-01-02T16:43:35Z")

</div>

> Hi All
> 
> Getting stuck at the first step with gems. I guess a tough start but hoping for a easy future.
> 
> So here I am.
> 
> I did install Gems in the separate /export directory of my Red Hat system.

You might need to tell ruby to look in that folder eg by passing ruby - I/export/wherever/its/put/those/files

Fred

---

<div class="post-metadata">

**Author:** ![Abhishek\_Pratap](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Abhishek\_Pratap](https://discuss.rubyonrails.org/u/Abhishek_Pratap)\
**Post date:** [January 2, 2009, 4:57pm UTC](https://discuss.rubyonrails.org/t/installing-gems/37889/3 "2009-01-02T16:57:13Z")

</div>

Hi Fred

Thanks for a quick reply. However I am unable to follow up. May be becoz I am platform ignorant till now.

So you want me to pass the ruby -I/export/wherever/its/put/those/ files but where exactly ?

Thanks again for your patience. -Abhi

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [January 2, 2009, 5:12pm UTC](https://discuss.rubyonrails.org/t/installing-gems/37889/4 "2009-01-02T17:12:41Z")

</div>

> Hi Fred
> 
> Thanks for a quick reply. However I am unable to follow up. May be becoz I am platform ignorant till now.
> 
> So you want me to pass the ruby -I/export/wherever/its/put/those/ files but where exactly ?

I don't know where those files got installed 🙂once you've worked out what the -I should be you can use RUBY\_OPT  
environment variable to have it added automatically if my memory is  
correct.

Fred

---

<div class="post-metadata">

**Author:** ![Abhishek\_Pratap](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Abhishek\_Pratap](https://discuss.rubyonrails.org/u/Abhishek_Pratap)\
**Post date:** [January 2, 2009, 6:47pm UTC](https://discuss.rubyonrails.org/t/installing-gems/37889/5 "2009-01-02T18:47:11Z")

</div>

Thanks .. got the hook of it now..

Works fine..

The ENV variable is RUBYOPT.

Cheers, -Abhi
