Forum: Ruby on Rails RoR server can't find a custom ruby module

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2009-03-09 11:22
(Received via mailing list)
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
Frederick C. (Guest)
on 2009-03-09 11:36
(Received via mailing list)
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
(Guest)
on 2009-03-09 12:12
(Received via mailing list)
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>
Frederick C. (Guest)
on 2009-03-09 12:29
(Received via mailing list)
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
This topic is locked and can not be replied to.