# Require doesn't see a file

**URL:** <https://www.ruby-forum.com/t/require-doesnt-see-a-file/148826>\
**Category:** Rails\
**Created:** [September 17, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/require-doesnt-see-a-file/148826 "2008-09-17T13:28:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstantin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Post date:** [September 17, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/require-doesnt-see-a-file/148826/1 "2008-09-17T13:28:40Z")

</div>

Hello!

I have installed ruby-iconv port on FreeBSD and try to work with it in  
irb console:  
home# script/console  
Loading development environment (Rails 2.1.0)

> > require ‘iconv’  
> > =\> []
> 
> > exit  
> > Works perfectly! But my Rails application doesn’t see this library:  
> > MissingSourceFile (no such file to load – iconv):

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem\_original\_require’

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in  
`require’

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:354:in  
`new\_constants\_in’

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in  
`require’  
/app/controllers/api\_controller.rb:5

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem\_original\_require’

/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’  
…

/app/controllers/api\_controller.rb on line 5 has the code: require  
‘iconv’

What is wrong? Can you suggest a solution?

---

<div class="post-metadata">

**Author:** ![konstantin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Post date:** [September 17, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/require-doesnt-see-a-file/148826/2 "2008-09-17T13:51:35Z")

</div>

On 17 Sep 2008, at 12:27, Konstantin wrote:

> Hello!
> 
> I have installed ruby-iconv port on FreeBSD and try to work with it in  
> irb console:

Do you have two parallel installations of ruby (one normal one and the  
ruby-enterprise one from Phusion) ?  
If so you’ll need to install ruby-iconv on that too.

Fred

---

<div class="post-metadata">

**Author:** ![konstantin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Post date:** [September 17, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/require-doesnt-see-a-file/148826/3 "2008-09-17T15:03:19Z")

</div>

> Do you have two parallel installations of ruby (one normal one and the  
> ruby-enterprise one from Phusion) ?  
> If so you’ll need to install ruby-iconv on that too.

Yes, I have 2 installations, thanks for the tip.  
I have searched for a good solution, but no success ☹ Ruby Enterprise  
group has a topic about the problem, and no solution in it too.

---

<div class="post-metadata">

**Author:** ![konstantin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Post date:** [September 17, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/require-doesnt-see-a-file/148826/4 "2008-09-17T15:49:16Z")

</div>

On 17 Sep 2008, at 14:02, Konstantin wrote:

> > Do you have two parallel installations of ruby (one normal one and  
> > the  
> > ruby-enterprise one from Phusion) ?  
> > If so you’ll need to install ruby-iconv on that too.
> 
> Yes, I have 2 installations, thanks for the tip.  
> I have searched for a good solution, but no success ☹ Ruby Enterprise  
> group has a topic about the problem, and no solution in it too.

Just repeat the installation but using the other ruby (obviously that  
won’t work if you installed the first one via your OS’s packaging  
mechanism - you’ll need to track down the ‘manual’ installation  
instructions.

Fred
