Lazaro,

I can't tell for sure what's going on without looking at your code, but I'm
willing to bet you are defining the classes like so:

    class BasicFields < V 1.0
        # some stuff
    end

    class BasicFields < V 1.1
        # some other stuff
    end

Am I right? If so, then you're not having a problem with Camping at all -
it's a problem with Ruby. Well, not really a problem, but more like a side
effect. The second definition of BasicFields is trying to redefine the
superclass of a defined class, and I'm not sure you can, or even would want
to do that. An easy solution to this issue is to just use a different,
descriptive name for your migration class. Something like:

    class BasicFields < V 1.0
    end

    class SomeFieldsMarketingSaidWeNeeded < V 1.1
    end


See? You are defining a class, but really just treat that class name as a
descriptor for the purpose of your migration. It's not going to be used
anywhere - you aren't really ever going to manually instantiate the
migration, and Camping knows what to do.

If this isn't your problem, then I sincerely apologize for wasting your
valuable time. Go get those little wheels!

<3 Ken


On Fri, Jun 28, 2013 at 9:21 AM, Lázaro Armando <netad...@lex-sa.cu> wrote:

> Hi
>
> I'm trying to add a column in to my model, just write a BasicFields V 1.1
> in to my models but when running camping it return this error
>
> deisi.rb:722:in `<module:Models>': superclass mismatch for class
> BasicFields (TypeError)
>         from deisi.rb:688:in `<module:Deisi>'
>         from deisi.rb:15:in `<top (required)>'
>         from
> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1.532/lib/camping/reloader.rb:98:in
> `load'
>         from
> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1.532/lib/camping/reloader.rb:98:in
> `load_file'
>         from
> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1.532/lib/camping/reloader.rb:60:in
> `load_apps'
>         from
> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1.532/lib/camping/reloader.rb:124:in
> `reload!'
>         from
> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1.532/lib/camping/server.rb:134:in
> `start'
>         from
> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:141:in
> `start'
>         from
> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1.532/bin/camping:9:in `<top
> (required)>'
>         from /usr/local/bin/camping:23:in `load'
>         from /usr/local/bin/camping:23:in `<main>'
>
>
> That only happen if I have 1.0 and 1.1 declared, after delete 1.0 that
> error is banished
>
> My question:
>
> I must delete the old BasicFields class?
>
> _______________________________________________
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to