# Libxml in production

**URL:** <https://www.ruby-forum.com/t/libxml-in-production/173153>\
**Category:** Ruby\
**Created:** [August 4, 2009, 5:19am UTC](https://www.ruby-forum.com/t/libxml-in-production/173153 "2009-08-04T05:19:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 4, 2009, 5:19am UTC](https://www.ruby-forum.com/t/libxml-in-production/173153/1 "2009-08-04T05:19:04Z")

</div>

I’m having an issue loading libxml in production. On the same machine:

Loading production environment (Rails 2.3.3)

> > require ‘libxml’  
> > =\> false

Loading development environment (Rails 2.3.3)

> > require ‘libxml’  
> > =\> []

The difference between my development.rb and production.rb that seems to  
make the difference is this:

#production  
config.cache\_classes = true

#development  
config.cache\_classes = false

Anyone know why this might be the case?

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 4, 2009, 9:23am UTC](https://www.ruby-forum.com/t/libxml-in-production/173153/2 "2009-08-04T09:23:28Z")

</div>

> I’m having an issue loading libxml in production. On the same machine:

Hi Vince,

If the return value of require is the issue then you don’t have one ;).  
‘require’ has been known to return many things. Is the libxml you’re  
requiring not working?

kaspar

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 4, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/libxml-in-production/173153/3 "2009-08-04T14:55:16Z")

</div>

Kaspar S. wrote:

> If the return value of require is the issue then you don’t have one ;).  
> ‘require’ has been known to return many things. Is the libxml you’re  
> requiring not working?

No, unfortunately not… I have a rake task that uses the vigetlabs-garb  
gem which seems to be failing production but not in development.

The cache\_classes difference seems to be the cause though I can’t be  
certain it’s related to libxml. My only guess to this effect is that I  
can’t require garb in production either and garb requires libxml.

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 10, 2009, 5:23pm UTC](https://www.ruby-forum.com/t/libxml-in-production/173153/4 "2009-08-10T17:23:41Z")

</div>

On Tue, Aug 4, 2009 at 4:57 PM, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Loading development environment (Rails 2.3.3)  
> > true value) no matter what.

Have you opened a bug for this?  
Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 4, 2009, 10:58pm UTC](https://www.ruby-forum.com/t/libxml-in-production/173153/5 "2009-08-04T22:58:23Z")

</div>

On Aug 3, 2009, at 20:19, Vince W. wrote:

> I’m having an issue loading libxml in production. On the same  
> machine:
> 
> Loading production environment (Rails 2.3.3)
> 
> > > require ‘libxml’  
> > > =\> false
> 
> Loading development environment (Rails 2.3.3)
> 
> > > require ‘libxml’  
> > > =\> []

Rails broke require\*. It didn’t load libxml in either case.

- Kernel#require returns either true or false, false when the feature  
was already loaded. After loading rails, Kernel#require returns an  
Array (a true value) no matter what.

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 11, 2009, 3:43am UTC](https://www.ruby-forum.com/t/libxml-in-production/173153/6 "2009-08-11T03:43:03Z")

</div>

On Mon, Aug 10, 2009 at 3:13 PM, Ryan D.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> > 
> 
> would it matter?
> 
> I’ve opened bugs on semantics that rails broke and core hasn’t even batted  
> an eye at it.

The core team has gotten better with bugs like this. Maybe they would  
surprise you.

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [August 10, 2009, 9:14pm UTC](https://www.ruby-forum.com/t/libxml-in-production/173153/7 "2009-08-10T21:14:19Z")

</div>

On Aug 10, 2009, at 07:51 , Rob S. wrote:

> > Rails broke require\*. It didn’t load libxml in either case.
> > 
> > - Kernel#require returns either true or false, false when the  
> > feature was  
> > already loaded. After loading rails, Kernel#require returns an  
> > Array (a  
> > true value) no matter what.
> 
> Have you opened a bug for this?

would it matter?

I’ve opened bugs on semantics that rails broke and core hasn’t even  
batted an eye at it.
