# Uninitialized constant Enum with Webrick & RMagick

**URL:** <https://www.ruby-forum.com/t/uninitialized-constant-enum-with-webrick-rmagick/81993>\
**Category:** Rails\
**Created:** [January 16, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-enum-with-webrick-rmagick/81993 "2007-01-16T19:16:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 16, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-enum-with-webrick-rmagick/81993/1 "2007-01-16T19:16:45Z")

</div>

Hi,

I try run a rails controller which uses RMagick for graphic generation.  
However, each time I load the “myController.rhtml” I always get the same  
error:  
“uninitialized constant Enum”, if I run on the same code on commandline  
by using “ruby -I /usr/…/…/RMagick/lib myController.rb”, the RMagick  
works correctly, the image is generated, but when I try to run it in  
Rails, it doesnt’ work, Is there any specific configuration I have to  
put in the config.rb …or else for rails?

Thanks you very much

Sayoyo

---

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 16, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-enum-with-webrick-rmagick/81993/2 "2007-01-16T20:42:41Z")

</div>

sayoyo wrote:

> Hi,
> 
> I try run a rails controller which uses RMagick for graphic generation.  
> However, each time I load the “myController.rhtml” I always get the same  
> error:  
> “uninitialized constant Enum”, if I run on the same code on commandline  
> by using “ruby -I /usr/…/…/RMagick/lib myController.rb”, the RMagick  
> works correctly, the image is generated, but when I try to run it in  
> Rails, it doesnt’ work, Is there any specific configuration I have to  
> put in the config.rb …or else for rails?
> 
> Thanks you very much
> 
> Sayoyo

Usually this is caused by not having the web server configured to make  
the LD\_LIBRARY\_PATH environment variable available. See  
[http://rubyforge.org/forum/forum.php?thread\_id=7526&forum\_id=33](http://rubyforge.org/forum/forum.php?thread_id=7526&forum_id=33).

---

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 16, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-enum-with-webrick-rmagick/81993/3 "2007-01-16T22:16:06Z")

</div>

HI,

I have already read the information, (Thanks you!!!) however, our server  
is not lighttpd…it is still webrick, and I didn’t find any information  
about its configuration that I can “set” the path, my $LD\_LIBRARY\_PATH  
is already set, but I wonder a $RUBYLIBS will it be the same???

Thanks you very much

Sayoyo
