I am implement a order system with AASM, but when I use rails c to check the function, but something wrong happen. NameError: uninitialized constant Order::AASM

There is gem 'aasm' in the Gemfile.
I have searched Google and StackOverflow with NameError: uninitialized constant Order::AASM, but got nothing that did work.
I have reload bundle install and rails s, even reboot the computer.
This is my code.

order's gist is here.
How to fix this? And if I can't find the right question, or you need more information, could you point it?
Try this:
Comment out gem 'spring'and gem 'spring-watcher-listen', '~> 2.0.0'
Run bundle install
Or try upgrading spring in your project:
gem 'spring', '~> 2.0', '>= 2.0.2'bundle update springIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With