[Ruby][FactoryGirl] Could not find a valid mapping for #<User

Ruby on Rails のプロジェクトにて、rake タスクに FactoryGirl 経由で Devise の user を作成したら、エラー出て死んだ。

■ エラーメッセージ

Could not find a valid mapping for #<User

そして、rake も rails s も rails c も何もできなくなった。

とりあえず、rvm 使っていたので、gemset を作り直すことで rake や rails s などは実行できるようになった。

しかし、User登録については、まだ解決できてない。ダレカタスケテ

【参考】

Reloading Factory Girl Factories in the Rails 3 Console | Transcending Frontiers はてなブックマーク - Reloading Factory Girl Factories in the Rails 3 Console | Transcending Frontiers

devise – “Could not find a valid mapping for #” only on second and successive tests – Stack Overflow はてなブックマーク - devise - ” only on second and successive tests – Stack Overflow” border=”0″ />