0
0

More than 1 year has passed since last update.

❯ rails g devise:installを実行したら

Posted at

ログイン機能を実装しているところでインストールをおこなった
以下の表示が出てくる。
❯ rails g devise:install
Running via Spring preloader in process
create config/initializers/devise.rb
create config/locales/devise.en.yml

===============================================================================

Depending on your application's configuration some manual setup may be required:

  1. Ensure you have defined default url options in your environments files. Here
    is an example of default_url_options appropriate for a development environment
    in config/environments/development.rb:

    config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
    

    In production, :host should be set to the actual host of your application.

    • Required for all applications. *

意味
環境ファイルにデフォルトのurlオプションが定義されていることを確認してください。以下は
は、開発環境に適した default_url_options の例です。
config/environments/development.rb で定義します。

   config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

 本番環境では、:host にアプリケーションの実際のホストを設定する必要があります。



 * すべてのアプリケーションで必要です。*
  1. Ensure you have defined root_url to something in your config/routes.rb.
    For example:

    root to: "home#index"
    
    • Not required for API-only Applications *
      意味

config/routes.rbでroot_urlをsomethingに定義していることを確認します。
例えば

   ルートから "home#index"
 
 * APIのみのアプリケーションでは必要ありません。

Ensure you have flash messages in app/views/layouts/application.html.erb.
For example:

   <p class="notice"><%= notice %></p>
   <p class="alert"><%= alert %></p>

 * Not required for API-only Applications *

意味
app/views/layouts/application.html.erb にフラッシュメッセージがあることを確認します。
例えば

   <p class="notice"><%= notice %></p>のようにします。
   <p class="alert"><%= alert %></p> ※API専用アプリケーションでは不要です。

 * APIのみのアプリケーションでは必要ありません。

4.You can copy Devise views (for customization) to your app by running:

   rails g devise:views
   
 * Not required *

意味
実行することで、Deviseのビュー(カスタマイズ用)をアプリにコピーできます。

   rails g devise:views
   
 * 必須ではありません。

Depending on your application's configuration some manual setup may be required:

(あなたのアプリケーションの構成次第で、手動の設定が必要な場合がある。) うーん、何が言いたいのかわからない。

特にmay beって突っ込みどころ満載だ。
1-4を全て行う必要があるのかないのか。
どっちだ。

これを参考に行えとターミナルは言っているのだろう。
apiを入れたければ1-4
それ以外なら1だけ行う
ってことで再度やってみる

0
0
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
0
0