# RoR server can't find a custom ruby module

**URL:** <https://www.ruby-forum.com/t/ror-server-cant-find-a-custom-ruby-module/162371>\
**Category:** Rails\
**Created:** [March 9, 2009, 10:22am UTC](https://www.ruby-forum.com/t/ror-server-cant-find-a-custom-ruby-module/162371 "2009-03-09T10:22:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2009, 10:22am UTC](https://www.ruby-forum.com/t/ror-server-cant-find-a-custom-ruby-module/162371/1 "2009-03-09T10:22:49Z")

</div>

Hello all!

Apologies if the question is answered in some basic doc but I couldn’t  
find it.

I have a ror app that runs in a mongrel server, everything integrated  
within radrails in windows. I have some custom ruby modules written in  
C++ which work fine when using ruby command line. However when  
starting the server I get an error:

C:/program files/Aptana/Aptana Studio 1.2/plugins/  
org.jruby\_1.1.6.8388p3/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:31 in `require’: no such file to load – MyModule  
(MissingSourceFile)

In normal windows ruby command line to make this error go away I need  
to

1. Tell ruby the correct load path with -I
2. Have the dll that are dependencies in the win PATH variable

I have tried to do this same thing in RoR (setting ENV[‘PATH’]) but  
failed. Any advice?

Thanks

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2009, 10:36am UTC](https://www.ruby-forum.com/t/ror-server-cant-find-a-custom-ruby-module/162371/2 "2009-03-09T10:36:19Z")

</div>

On Mar 9, 3:01 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello all!
> 
> Apologies if the question is answered in some basic doc but I couldn’t  
> find it.
> 
> I have a ror app that runs in a mongrel server, everything integrated  
> within radrails in windows. I have some custom ruby modules written in  
> C++ which work fine when using ruby command line. However when  
> starting the server I get an error:

Can I assume from that path that you are (at least partially) using  
jruby? jruby can’t load c++ ruby modules.

Fred

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2009, 11:12am UTC](https://www.ruby-forum.com/t/ror-server-cant-find-a-custom-ruby-module/162371/3 "2009-03-09T11:12:45Z")

</div>

Thanks a lot Fred, seems that’s the issue. I changed to a standard VM  
now. Still doesn’t work but for a different reason: my module and Ruby  
haven’t been compiled with the same compiler so they are not  
compatible.

My module is compiled with VS2005. Is there a way to avoid having to  
recompile ruby/dependencies like some gems and possibly rails?

Thanks everyone

On Mar 9, 6:35 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2009, 11:29am UTC](https://www.ruby-forum.com/t/ror-server-cant-find-a-custom-ruby-module/162371/4 "2009-03-09T11:29:43Z")

</div>

On 9 Mar 2009, at 10:11, removed\_email\_address@domain.invalid wrote:

> Thanks a lot Fred, seems that’s the issue. I changed to a standard VM  
> now. Still doesn’t work but for a different reason: my module and Ruby  
> haven’t been compiled with the same compiler so they are not  
> compatible.
> 
> My module is compiled with VS2005. Is there a way to avoid having to  
> recompile ruby/dependencies like some gems and possibly rails?

Not a windows guy so I don’t completely get those issues.

Fred
