RoR server can't find a custom ruby module


#1

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


#2

On Mar 9, 3:01 am, “removed_email_address@domain.invalid” 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


#3

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


#4

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