devbanana — 2010-05-15T12:34:27-04:00 — #1
I'm working on a Rails application. However, for some reason it won't load gems.
I created a library to communicate with the eNom API, and am using LibXML to parse the response. It works when I test it by itself, but won't work when I use it through a model. If I try requiring xml or libxml, it says the file couldn't be loaded. If I just try using it, since I enabled it in config/environment.rb, it says uninitialized constant.
If I load script/console, I can call LibXML or just XML just fine. However it just won't work in the application itself.
Gems are installed and working. I defined RUBYOPT in /etc/bashrc to load rubygems. They are working in ruby applications that aren't using rails. However in rails itself it won't work.
- ruby 1.8.7
- gem 1.3.7
- rails 2.3.5
- libxml-ruby 1.1.4
Any help is much appreciated.
devbanana — 2010-06-04T10:23:00-04:00 — #2
Oh, this was solved long ago. I'm not patient enough to wait three weeks without finding a way to solve something.
I'd post what I did, but I'm not really sure. It was a lot of trial and error, but it just started working.
reggieb — 2010-06-04T08:51:31-04:00 — #3
Can you post an example of the code you use in a model to require the LibXML? Also the error output would be useful.