# FlexImage "Unitialized Constant" Error

**URL:** <https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739>\
**Category:** Rails\
**Created:** [December 8, 2006, 6:52am UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739 "2006-12-08T06:52:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [December 8, 2006, 6:52am UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739/1 "2006-12-08T06:52:56Z")

</div>

I just installed the FlexImage plugin into my project, and immediately I  
got the “uninitialized constant FlexImage” error. This happened after I  
switched one of my models to inherit from FlexImage instead of  
ActiveController, like it said in the README.

Does anybody know what I have to change to make this plugin work?  
Everybody else seems to rave about it.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [December 8, 2006, 7:54am UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739/2 "2006-12-08T07:54:38Z")

</div>

Sean C. wrote:

> I just installed the FlexImage plugin into my project, and immediately I  
> got the “uninitialized constant FlexImage” error. This happened after I  
> switched one of my models to inherit from FlexImage instead of  
> ActiveController, like it said in the README.
> 
> Does anybody know what I have to change to make this plugin work?  
> Everybody else seems to rave about it.

Maybe you have to add a require ‘something’ directive on top off your  
model file ?

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [December 8, 2006, 8:12am UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739/3 "2006-12-08T08:12:40Z")

</div>

> Maybe you have to add a require ‘something’ directive on top off your  
> model file ?

Thanks nuno. I tried adding “require FlexImage”, but it didn’t do  
anything. The guy that designed this plugin sure didn’t place the  
documentation very high on his priority list.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [December 8, 2006, 8:20am UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739/4 "2006-12-08T08:20:08Z")

</div>

Oops. Just remembered that the guy who designed the plugin had helped me  
in a previous thread. Sorry about the dig, Alex!

But still, what’s the deal with the errors? I did everything you wrote.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [December 8, 2006, 8:27pm UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739/5 "2006-12-08T20:27:06Z")

</div>

Sean C. wrote:

> Oops. Just remembered that the guy who designed the plugin had helped me  
> in a previous thread. Sorry about the dig, Alex!
> 
> But still, what’s the deal with the errors? I did everything you wrote.

No hard feelings, sorry you’re having trouble. You sure you have  
installed the plugin properly and rebooted your development server?

It sounds like rails isn’t loading the plugin at all.

Try this to troubleshoot. Go to vendor/plugins/flex\_image/init.rb and  
add this to the bottom of that file:

raise ‘foo’

Then reboot your web server. If rails is loading the plugin like it  
should, the web server should fail to start and give an error like:

/vendor/plugins/flex\_image/init.rb:12:in `load\_plugin’: foo  
(RuntimeError)

If the web server starts successfully without an error, then either you  
do not have the plugin installed properly (reinstall it via  
script/plugin), or there is something odd about your config.

As for the documentation, you know where the rdoc is right?

[http://beautifulpixel.com/flex\_image/index.html](http://beautifulpixel.com/flex_image/index.html)

If that lacking tell me how to improve it. Sadly, I am a better  
programmer than I am a writer…

Happy flexing  
-Alex

* * *

> **[Beautiful Pixel](https://beautifulpixel.com)**
>
> A log of random code experiments and semi-useless thoughts from some software developer named Alex...

> **[magneticworld.com - This website is for...](http://magneticworld.com)**
>
> This website is for sale! magneticworld.com is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, magneticworld.com has it all. We hope you find what you are...

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [December 11, 2006, 3:27am UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739/6 "2006-12-11T03:27:22Z")

</div>

Yeah, see? Started up no problem. Thanks Alex.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [December 11, 2006, 1:58am UTC](https://www.ruby-forum.com/t/fleximage-unitialized-constant-error/78739/7 "2006-12-11T01:58:39Z")

</div>

> If that lacking tell me how to improve it. Sadly, I am a better  
> programmer than I am a writer…

No, no - you’re fine. I should know better than to vent my frustration  
on others like that, whether they’ve helped me or not. I’m still new at  
this and I’m not used to being a novice at things. Anyway, thanks for  
your help. I probably just need to restart the server. _making pistol  
shape with hand, firing into head_ duh
