ruby on rails - How to resolve "not authorized for query on db.users" Mongoid -


i've created new rails app using rails 4 , mongoid 4. i'm getting error "not authorized query on mydb.users" when run test:

rspec.describe user, type: :model      "is invalid without name"         user = user.new(name: nil)         user.valid?         expect(user).to be_invalid     end     ...  end 

at first thought authorisation issue mongoid , mongodb, can access mongoldb/db/collection without authenticate in console without trouble.

because i'm new rspec tests, i'm not sure problem test, mongoid or mongodb.

any ideas?


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -