2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Running via Spring preloader in process. Could not find generator 'devise'の原因と解決策

Last updated at Posted at 2019-05-10

###開発環境
・MacOS
・Ruby -v 2.6.0
・Rails 5.1

###やりたいこと

deviseとdevise_inivitableで招待機能を実装したい。
deviseを入れて、devise_invitable入れて、実装する。

そのために、deviseのUserモデルを作りたい
参照文献:https://qiita.com/kera/items/6fab6ef0661824d0fa0d

###エラー

$ rails g devise User
Running via Spring preloader in process 65446
Could not find generator 'devise'. Maybe you meant 'mailer', 'task' or 'helper'
Run `rails generate --help` for more options.

###試したこと

####①$spring stop

$ spring stop
Spring stopped.
$ rails g devise User
Running via Spring preloader in process 65482
Could not find generator 'devise'. Maybe you meant 'mailer', 'task' or 'helper'
Run `rails generate --help` for more options.

####②Gemfileを確認

gem 'device'になっていて、typoでした。

gem 'devise'に変更して、$bundle installして、$ rails g devise Userやったら、無事にUserモデルできました。

参照:https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q10164373290

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?