2

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

Bug showed in console

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.

enter image description here

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?

4

2 に答える 2

2

これを試して:

  1. コメントアウトしgem 'spring'gem 'spring-watcher-listen', '~> 2.0.0'

  2. 走るbundle install

または、プロジェクトで spring をアップグレードしてみてください。

  1. あなたの宝石ファイルでgem 'spring', '~> 2.0', '>= 2.0.2'
  2. 走るbundle update spring
于 2017-06-09T06:37:01.457 に答える