0

I use Puma and Rails 4.2.

My concern is set up like this:

Class Order module Chartable ... end end 

The order class is set up like this:

Class Order include Chartable end 

In development, the code showed no errors, but in the production I got the error:

Unable to load application: TypeError: superclass mismatch for class Order.

I don't know why this error happens, and after consulting some documentation, I think the error comes from Puma's set :puma_preload_app, true - is it right?

How can I fix this error and preload_app always set to true?

7
  • Is that actually what is in your files? Doesn't look like valid ruby at the moment to me Commented Jun 12, 2015 at 8:31
  • Any particular reason Chartable is declared withing Order? Commented Jun 12, 2015 at 12:50
  • @FrederickCheung My files just like model/concerns/order/chartable.rb Commented Jun 14, 2015 at 6:31
  • @jcm Because Chartable only work in Order. Commented Jun 14, 2015 at 6:31
  • 1
    Is that the complete code? This other question with the same error happened because a class was defined twice with different superclasses. Commented Jun 14, 2015 at 7:07

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.