mongodb - Rails 4 - Uninitialized constant Mongo Model -


I am trying to setup MongoHQ using Harko and Rail 4. 4. I have set up everything correctly to my knowledge, but now I'm getting this error:

undefined constant jobs :: TempEmailContactStoreCsv

This is the Job model where the error is happening: class jobs & lt;

And I Mongo models: p>

  Classes in TempEmailContactStoreCsv Mongoid :: Document field: email_contact_array, Type: Array field: job_id def self. store (job_id, email_contact_array) r = TempEmailContactStoreCsv.find_by (job_id: job_id) that (rnn?) TempEmailContactStoreCsv.create! (Job_id: job_id, email_contact_array: email_contact_array) End end def self.exists? (Job_id) r = TempEmailContactStoreCsv.find_by (job_id: job_id) Returns RNL? == wrong end Diif self.retrieve (job_id) return TempEmailContactStoreCsv.find_by (job_id: job_id) end Diif self.delete (job_id) r = TempEmailContactStoreCsv.find_by (job_id: job_id) r.destroy until r.nil? End end   

It seems that my Mongo model is not being started, and the namespace seems strange to me.

Any idea as to the cause of this error and the way to fix it?

include

rail automatically to load class file rail load path (which app / models , So you should be right there) and the name of the file should be the heat version of the class name.

should be the name of the file in your case temp_email_contact_store_csv.rb not temp_email_store_csv.rb

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -