database - Rails ActiveSupport Issue with state gems for notifications -


i have installed multiple state_machine gems app use them notification system every time run activesupport issue. looks identical this:

>> m = message.new typeerror: wrong argument type nil (expected module)         /home/ryan/appname/app/models/message.rb:2:in `include'         /home/ryan/appname/app/models/message.rb:2         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:406:in `load_without_new_constant_marking'         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:406:in `load_file'         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:547:in `new_constants_in'         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:405:in `load_file'         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:285:in `require_or_load'         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:451:in `load_missing_constant'         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:106:in `rake_original_const_missing'         /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in `const_m issing'         /home/ryan/.bundle/ruby/1.8/gems/activesupport-2.3.9/lib/active_sup port/dependencies.rb:118:in `const_missing'         (irb):2 

i'm on windows 7 machine using activerecord, bundler install gems, , rails 2.3.9..where going wrong? there modification database need making?

edit: message.rb      include alterego # include first     include alterego::activerecordadapter      state :unread, :default => true       handle :state     "unread"       end       transition :to => :read, :on => :view!     end      state :read       handle :state     "read"       end     end 

i'm not positive, having trouble adapting activerecord. need create new database?

edit

i ended using oldschool acts_as_state_machine since such simple implementation


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -