FlexImage "Unitialized Constant" Error

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.

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 ?

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.

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.

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

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

Happy flexing
-Alex


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

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