I’ve made a model called Color to manage custom styles for my
application. It works find when I’m running it locally in Mongrel,
and I haven’t tried to deploy it yet.
I use ZenTest and Autotest, and when I run autotest I’m getting the
following message:
“C:/rails/band/trunk/app/models/color.rb:1: Color is not a class
(TypeError)”
My Color model is very simple:
class Color < ActiveRecord::Base
belongs_to :setting
validates_presence_of :title
end
I’ve run ‘rake db:test:clone’ to make sure the test database is
prepared. The application works normally in development mode, but it
blows up in autotest. I’m not sure what’s going on.
I’ve made a model called Color to manage custom styles for my
application. It works find when I’m running it locally in Mongrel,
and I haven’t tried to deploy it yet.
I use ZenTest and Autotest, and when I run autotest I’m getting the
following message:
“C:/rails/band/trunk/app/models/color.rb:1: Color is not a class
(TypeError)”
This message is complaining that there’s already a constant called
Color and it’s not a class.
Running this simple Ruby program give the same error:
Color = “Red”
class Color
end
Now where the Color constant is being defined, I’m not sure, but I’m
pretty sure that it’s not in Rails itself, my guess would be either
somewhere in your own code, or in a gem or plugin you are using.
This message is complaining that there’s already a constant called
Color and it’s not a class.
Thanks! Any ideas on why it would create a conflict in Test mode but
not in Development? I’ll look through the plugins I’ve got and see if
it’s defined anywhere else.