20210329のRailsに関する記事は19件です。

【Rails】An error occurred while installing pg (1.1.4), and Bundler cannot continue.時の対処法

症状

railsチュートリアルに載っていたGemの設定をコピペして、bundle updateをしたら、下記のエラーが表示され、正常にupdateできなかったようです。

Rails v6.0.3

 bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.....
Using rake 12.3.3
Using concurrent-ruby 1.1.8
Using i18n 1.8.9
Using minitest 5.11.3 (was 5.14.4)
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using zeitwerk 2.4.2
Using activesupport 6.0.3
Using builder 3.2.4
Using erubi 1.10.0
Using mini_portile2 2.5.0
Using racc 1.5.2
Using nokogiri 1.11.2 (x86_64-linux)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.9.0
Using rails-html-sanitizer 1.3.0
Using actionview 6.0.3
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 6.0.3
Using nio4r 2.5.7
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.3
Using actioncable 6.0.3
Using globalid 0.4.2
Using activejob 6.0.3
Using activemodel 6.0.3
Using activerecord 6.0.3
Using mimemagic 0.3.10
Using marcel 0.3.3
Using activestorage 6.0.3
Using mini_mime 1.0.3
Using mail 2.7.1
Using actionmailbox 6.0.3
Using actionmailer 6.0.3
Using actiontext 6.0.3
Using bundler 1.17.2
Using method_source 1.0.0
Using thor 1.1.0
Using railties 6.0.3
Using sprockets 3.7.2
Using sprockets-rails 3.2.2
Using rails 6.0.3
Fetching active_storage_validations 0.8.2
Installing active_storage_validations 0.8.2
Using public_suffix 4.0.6
Using addressable 2.7.0
Fetching ansi 1.5.0
Installing ansi 1.5.0
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching autoprefixer-rails 10.2.4.0
Installing autoprefixer-rails 10.2.4.0
Fetching aws-eventstream 1.1.1
Installing aws-eventstream 1.1.1
Fetching aws-partitions 1.436.0
Installing aws-partitions 1.436.0
Fetching aws-sigv4 1.2.3
Installing aws-sigv4 1.2.3
Fetching jmespath 1.4.0
Installing jmespath 1.4.0
Fetching aws-sdk-core 3.113.0
Installing aws-sdk-core 3.113.0
Fetching aws-sdk-kms 1.43.0
Installing aws-sdk-kms 1.43.0
Fetching aws-sdk-s3 1.46.0
Installing aws-sdk-s3 1.46.0
Fetching bcrypt 3.1.13
Installing bcrypt 3.1.13 with native extensions
Using bindex 0.8.1
Using msgpack 1.4.2
Using bootsnap 1.4.5
Using ffi 1.15.0
Using sassc 2.4.0
Fetching bootstrap-sass 3.4.1
Installing bootstrap-sass 3.4.1
Fetching will_paginate 3.1.8
Installing will_paginate 3.1.8
Fetching bootstrap-will_paginate 1.0.0
Installing bootstrap-will_paginate 1.0.0
Using byebug 11.0.1
Using regexp_parser 1.8.2
Using xpath 3.2.0
Using capybara 3.28.0
Using childprocess 2.0.0
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching faker 2.1.2
Installing faker 2.1.2
Fetching formatador 0.2.5
Installing formatador 0.2.5
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using ruby_dep 1.5.0
Using listen 3.1.5
Fetching lumberjack 1.2.8
Installing lumberjack 1.2.8
Fetching nenv 0.3.0
Installing nenv 0.3.0
Fetching shellany 0.0.1
Installing shellany 0.0.1
Fetching notiffany 0.1.3
Installing notiffany 0.1.3
Fetching pry 0.14.0
Installing pry 0.14.0
Fetching guard 2.16.2
Installing guard 2.16.2
Fetching guard-compat 1.2.1
Installing guard-compat 1.2.1
Fetching guard-minitest 2.4.6
Installing guard-minitest 2.4.6
Fetching mini_magick 4.9.5
Installing mini_magick 4.9.5
Fetching ruby-vips 2.1.0
Installing ruby-vips 2.1.0
Fetching image_processing 1.9.3
Installing image_processing 1.9.3
Using jbuilder 2.9.1
Fetching ruby-progressbar 1.11.0
Installing ruby-progressbar 1.11.0
Fetching minitest-reporters 1.3.8
Installing minitest-reporters 1.3.8
Fetching pg 1.1.4
Installing pg 1.1.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/pg-1.1.4/ext
/home/ubuntu/.rvm/rubies/ruby-2.6.3/bin/ruby -I /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0 -r ./siteconf20210329-4274-geu1jf.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/home/ubuntu/.rvm/rubies/ruby-2.6.3/bin/$(RUBY_BASE_NAME)
        --with-pg
        --without-pg
        --enable-windows-cross
        --disable-windows-cross
        --with-pg-config
        --without-pg-config
        --with-pg_config
        --without-pg_config
        --with-pg-dir
        --without-pg-dir
        --with-pg-include
        --without-pg-include=${pg-dir}/include
        --with-pg-lib
        --without-pg-lib=${pg-dir}/lib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/ubuntu/.rvm/gems/ruby-2.6.3/extensions/x86_64-linux/2.6.0/pg-1.1.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/pg-1.1.4 for inspection.
Results logged to /home/ubuntu/.rvm/gems/ruby-2.6.3/extensions/x86_64-linux/2.6.0/pg-1.1.4/gem_make.out

An error occurred while installing pg (1.1.4), and Bundler cannot continue.
Make sure that `gem install pg -v '1.1.4' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  pg

最後のほうにある「An error~」を翻訳に放り込むと、
「pg(1.1.4)のインストール中にエラーが発生し、Bundlerを続行できません。
バンドルする前に、 gem install pg -v '1.1.4' --source'https:// ruby​​gems.org / 'が成功することを確認してください。」

となりました。

メッセージの通り、gem install pg -v '1.1.4' --source 'https://rubygems.org/を実施しましたが、解決しませんでした。

解決策

bundle install --without production後に、bundle updateしたら治りました。
なぜ治ったかは不明。。。

#エラーが出る
bundle install --without production

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
You have requested:
  minitest = 5.11.3

The bundle currently has minitest locked at 5.14.4.
Try running `bundle update minitest`

If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`

#updateが正常に完了できる
bundle update

参考

Railsチュートリアル13章
https://railstutorial.jp/chapters/user_microposts?version=6.0#code-final_gemfile

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

Userテーブルからの外部キーを複数取得する方法

はじめに

ユーザー(reviewer)がユーザー(reviewee)をレビューする機能を実装するために行った、usersテーブルから2つの外部キーを取得する方法について記述したいと思います。

外部キーを複数取得

通常、外部キーを取得する際は

マイグレーションファイル
t.references :user, foreign_key: true

上記のようにすることで、参照先(usersテーブル)をもとにテーブル内に user_id というカラムが作成されます。
railsのデフォルトでは、外部キーを表す命名規則が${model名}_idと決まっているため、同じmodelを参照する外部キーがそのままでは設定できない。

今回の場合は、同じテーブル内に複数の外部キーを取得したいので

マイグレーションファイル
class CreateReviews < ActiveRecord::Migration[6.0]
  def change
    create_table :reviews do |t|
      t.integer    :score,    null: false
      t.text       :content
      t.references :reviewer, foreign_key: {to_table: :users}
      t.references :reviewee, foreign_key: {to_table: :users}
      t.timestamps
    end
  end
end

ポイントは {to_table: :users} の箇所で、
references 型カラムを定義している部分でオプション :foreign_key にサブオプション :to_table を参照先テーブル名とともに指定することで、正しく参照先テーブルを参照し、テーブル(reviewsテーブル)が作成することができます。

アソシエーション

modelの belongs_to/has_many で foreign_key を明示的に指定する。

user.rb
class User < ApplicationRecord

 (省略)

  has_many :reviewer_reviews, class_name: 'Review', :foreign_key => 'reviewer_id'
  has_many :reviewee_reviews, class_name: 'Review', :foreign_key => 'reviewee_id'

  (省略)

end

review.rb
class Review < ApplicationRecord
  belongs_to :reviewer, :class_name => 'User', :foreign_key => 'reviewer_id'
  belongs_to :reviewee, :class_name => 'User', :foreign_key => 'reviewee_id'
end
has_many :reviewer_reviews, class_name: 'Review', :foreign_key => 'reviewer_id'

Reviewテーブル(class_name: 'Review')の
reviewer_id(:foreign_key => 'reviewer_id')を
reviewer_reviews(has_many :reviewer_reviews)として取得できる。

参考

https://qiita.com/kymmt90/items/03cb9366ff87db69f539
https://qiita.com/takeoverjp/items/bb56d6a8eae191cd3732

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

adminページのアクセス制限方法

こんにちは、たにーです。

今回もadminについてです。

admin専用のページには、adminだけが見れるのが当たり前だと思います。
ただ、チーム開発で他のチームでアクセス制限が出来ていないのが見られました。

今回は、その設定方法をまとめます。
他にも方法があると思いますが、チームメンバーで考えた結果これぐらいかなと思ってます。

他にあれば教えてください。

adminページのアクセス制限

下記は、現在のルートです。
adminでitemのindex~showまであるとします。

terminal
             Prefix Verb       URI   Pattern                 Controller#Action
        admin_items GET    /admin/items(.:format)            admin/items#index
                    POST   /admin/items(.:format)            admin/items#create
     new_admin_item GET    /admin/items/new(.:format)        admin/items#new
    edit_admin_item GET    /admin/items/:id/edit(.:format)   admin/items#edit
         admin_item GET    /admin/items/:id(.:format)        admin/items#show

もし、アクセル制限を行わないと、
管理者でない通常のお客さんでも商品登録が出来ちゃいます。(笑)

方法①

adminがもつコントローラーにそれぞれ記述する。

items_controller.rb
 before_action :authenticate_admin!

autehntiateは、「認証する」という意味です。

つまりこの記述は、

「このコントローラー(items_controller)に記述してあるアクションは、adminだけが使用できるよ。
 だから、アクションを実行する前に、adminであるか確認してね。」
 

を意味します。

adminじゃなければ、ログイン画面に遷移されます。

方法②

apllicationコントローラーで纏めてアクセス制限を行う方法。

application_controller.rb
class ApplicationController < ActionController::Base
  before_action :authenticate_admin!, if: :admin_url 

  def admin_url
    request.fullpath.include?("/admin")
  end

end

分解して解説します。

before_aciton

application_controller.rb
  before_action :authenticate_admin!, if: :admin_url

=> ①で説明しているのでベースは省きます。
  ifの部分ですが、「admin_urlを参照する」を意味します。
  
  この後に、「admin_url」のメソッドが記述します。

admin_url

application_controller.rb
  def admin_url
    request.fullpath.include?("/admin")
  end

=> request.fullpathで、飛んだ先のpathを全て取得します。
  include?(val)で、valと同じ要素が含まれていれば、trueを返します。
  
  つまり、パスに「/admin」が含まれているかどうかを確認する。です。

となります。

なので、 まとめると、

「pathに/adminが含まれている全てのページは、adminでログインしないと見れないよ。」

となります。

以上、たにーでした。

参考文献

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

Railsコンソールを使ってレコード登録を行う方法

こんにちは、たにーです。

Railsのコンソールでadminレコードを作成したい場面がありましたので、
備忘録として記述します。

rails console(コンソール)とは

rails の環境を読み込んだ状態でrubyコードを実行できるツールです。
他にも作成している rails アプリケーション内で定義したメソッドや読み込んでいる gem も実行することができます。

役立つ場面
- いろんなメソッドを試しながら実装したいとき
- エラーが起こったが原因がわからないとき

詳しくは今回書きませんが、
エラーが起きた際には、非常に役立つので覚えて損はありません。

実際にコンソールで登録してみよう

まずは、コンソールを立ち上げます。

terminal
 $ rails c
   Running via Spring preloader in process 6516
   Loading development environment (Rails 5.2.4.5)
   [1] pry(main)> 
terminal
   [1] pry(main)> モデル名.create(カラム名:"カラムの値")
terminal
   [1] pry(main)> Admin.create!(email:"test1@gmail.com", password:"123456", )
      (0.1ms)  begin transaction
     Admin Exists (0.2ms)  SELECT  1 AS one FROM "admins" WHERE "admins"."email" = ? LIMIT ?  [["email", "tesrt1@gmail.com"], ["LIMIT", 1]]
     Admin Create (4.8ms)  INSERT INTO "admins" ("email", "encrypted_password", "created_at", "updated_at") VALUES (?, ?, ?, ?)  
         [["email", "test1@gmail.com"], ["encrypted_password", "$2a$12$gtXWZK10cp32d99s7zfnjO9OT19Q4FLT0nJPdTwVMKOTcnZXMtt6q"], 
         ["created_at", "2021-03-29 09:41:14.618946"], ["updated_at", "2021-03-29 09:41:14.618946"]]
      (5.3ms)  commit transaction
    => #<Admin id: 1, email: "test1@gmail.com", created_at: "2021-03-29 09:41:14", updated_at: "2021-03-29 09:41:14">

Createと出ており、無事idも付与されているのが分かります。
念の為、adminモデルに保存されているか確認しましょう。

terminal
   [2] pry(main)> モデル名.all

コントローラーの書き方と同じです。

terminal
   [2] pry(main)> Admin.all
     Admin Load (0.2ms)  SELECT "admins".* FROM "admins"
   => [#<Admin id: 1, email: "tesrt1@gmail.com", created_at: "2021-03-29 09:41:14", updated_at: "2021-03-29 09:41:14">,
   [3] pry(main)> 

確認できましたね。

終了するときは quitまたはexitでコンソールを閉じることができます。

rails consoleの表記違い

あれ?私のと表記が違う?という方もいるのではないようでしょか?
通常であれば、、下記の表記だと思われます。

terminal
   [1] irb(main)>

私のは、irbではなく、pryになっていたかと思います。

terminal
   [1] pry(main)>

irbとは

「Interactive Ruby」の略で、対話形式でプログラムを実行できるようになるコマンドです。

pry(プライ)とは?

標準のirbよりも機能的にすぐれた対話型ツール。

なので、よほどの理由がない限り標準のirbでconsoleを使用するよりもpryを使用すべき。

pryの導入

至って簡単です。
gemを導入するだけです。

Gemfile
gem 'pry-rails'

その後は、budle installを実行。

terminal
 $ bundle install

これで、コンソールの表記は変わっていると思います。

参考文献でpryの使い方も書いてあり、

  • show-model(s) (モデルのデータタイプを確認できる。)
  • show-routes (早くルートを確認できる。)

は使えそうなので、今度試してみます。

以上、たにーでした。

参考文献

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

collection_check_boxes を用いた中間テーブルのコールバック

collection_check_boxes を用いて中間テーブルを削除した際に、中間モデルの after_destroy のコールバックを実行したかったが上手くいきませんでした。

モデル

class Route < ApplicationRecord
  belongs_to :user
  has_many :route_spots, dependent: :destroy
  has_many :spots, through: :route_spots
end

class Spot < ApplicationRecord
  belongs_to :user
  has_many :route_spots, dependent: :destroy
  has_many :routes, through: :route_spots
end

class RouteSpot < ApplicationRecord
  belongs_to :route
  belongs_to :spot
  after_destroy :align_sequence

  private
    def align_sequence
      self.route.route_spots.order(sequence: "ASC").each_with_index{ |object, index|
        object.sequence = index + 1
        object.save
      }
    end
end

コントローラ

routes_controller.rb
class RoutesController < ApplicationController
  before_action :authenticate_user!
  before_action :set_id, only: %i[edit destroy update show]

  ...省略

  def edit
    @my_spots = current_user.spots
  end

  def update
    if @route.update(route_params)
      redirect_to routes_path(anchor: "id_#{@route.id}"), notice: "「#{@route.name}」を編集しました"
    else
      render :edit
    end
  end

  ...省略

  private
  def route_params
    params.require(:route).permit(:id, :name, :memo, :sequence, spot_ids:[])
  end

  def set_id
    @route = Route.find(params[:id])
  end
end

view

views/routes/edit.html.slim
= form_with model: route, local:true, id:"route_form" do |f|
  = f.label :name
  = f.text_field :name, id: 'route_name'
  = f.label :memo
  = f.text_area :memo, id: 'route_memo'
  = f.collection_check_boxes(:spot_ids, @my_spots, :id, :name)
  = f.submit '登録する' , class:'button-primary'

やりたかったこと

動作自体は、Route の edit 時に、has_may な Spots の登録/登録解除を、collection_check_boxes で簡単に実装しただけのなんてことのないもの。
やりたかったのは、collection_check_boxes でチェックを外して route を update (routeのupdate と同時に route.route_spots が destroy)した際に、RouteSpotモデルの after_destroy で メソッドalign_sequence を実行したかった。

しかし、after_destroy、before_destroy、どちらでも動作せず、ただ RouteSpot の destroy が完了するだけでした。

結論

あまり良いとは言えないかもしれないですが、RouteSpot のコールバック(after_destroy)ではなく、Route のコールバック(after_update)ので処理することにしました。
もともと、route.route_spots に対し一括で連番を振り直すというものだったので、ひとまずやりたいことは問題なく動作しますので、今回はこれで妥協します。

仕様と言われたら納得いきますが、バグ、しかも長期にわたって放置されているものとだと思うとちょっと微妙な気持ちです。

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

Ruby on Railsのビューに関するエラー

1.はじめに

この記事では私が実際に体験したエラーとその原因と解決方法について書いてます
参考になるかどうかわかりませんがよろしくお願いします。

2.エラー内容

エラー.png
今回のエラーはツイートアプリにて新規投稿した際に
発生したエラーになります。

3.エラー解説

まずは一番上の文のNo templete for interactive requestについて解説していきます。

No templateとは訳すとビューファイルが見つからないよということになります

じゃあなんのビューファイルが見つからないかというとその下の分をみてもらうと
TweetsController#new is missing a template for request formats: text/html
と書いてあります。
Tweetsコントローラーのnewアクションに対応するビューファイルが見つからないよということ

このことからビューファイルになんらかの問題があるという仮説が立てられます。

4.エラー解決

そしてビューフォルダのツイートフォルダをみてもらうと

本来はnew.html.erbのところがnwe.html.erbになってしまっています。

これを正しい表記、new.html.erbにしてあげるとエラーが
解消します。

5.あとがき

今回のエラーはビューファイルの表記ミスでしたが今一度MVCのコントローラーとビューについて復習してみると
コントローラー内のアクションはレスポンスとしてブラウザに返す見た目をビューフォルダの中から見つけ出す役割があります。
例をいうとコントローラー内で

tweets_controller.rb
def index      
 @tweet = Tweet.all   
end

と記述していてもビューフォルダでそのコントローラー内のアクションに対応しているビューファイルがないとコントローラはレスポンスとしてブラウザに返すことができない。
そのため今回のようなエラーが起こりました。

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

【Ruby】先頭と末尾の空白文字を指定して取り除く方法

プログラミング勉強日記

2021年3月29日
昨日の記事ではstripメソッドの使い方について扱った。Stripメソッドは先頭と末尾の空白文字を取り除くメソッドである。今日は取り除く空白文字の位置を指定して削除する方法を簡単にまとめる。

先頭の空白文字を取り除く方法

 listripメソッド(listrip!メソッド)を使うと、先頭の空白文字を取り除く。listripメソッドは、取り除いた結果として新しい文字列を作成する。lstrip!メソッドは元の文字列に上書きする形で書きかえる。

使い方
str = " Hello World "
listripStr = str.lstrip
#=> "Hello World "

str = " Hello World "
str.lstrip!
#=> "Hello World "

末尾の空白文字を取り除く方法

 rstripメソッド(rstrip!メソッド)を使うと、末尾の空白文字を取り除く。rstripメソッドは、取り除いた結果として新しい文字列を作成する。rstrip!メソッドは元の文字列に上書きする形で書きかえる。

使い方
str = " Hello World "
listripStr = str.rstrip
#=> "  Hello World"

str = " Hello World "
str.rstrip!
#=> " Hello World"

参考文献

空白文字を取り除く

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

userがadminの新規登録をさせない方法

adminの新規登録を防ぐ

単純にadminの設定をしたままだと、
routesを見てもわかる通り、adminの新規会員登録ができてしまいます。

つまり、管理権限を持たない一般ユーザーでも管理者アカウントを作成できてしまいます。
セキュリティーとして問題大です。

解決方法としては、下記を実施。

解決方法

方法は、至って簡単です。
adminモデルファイルから:resisterableを削除

models/admin
:registerable, =>  #削除しましょう。

下記が、削除後の記述になります。

models/admin
class Admin < ApplicationRecord
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
  devise :database_authenticatable,:recoverable, :rememberable, :validatable
end

結果

ルーティングからregitrationが消えたと思います。

terminal
             Prefix Verb   URI        Pattern                    Controller#Action
        new_admin_session GET    /admin/sign_in(.:format)        admin/sessions#new
            admin_session POST   /admin/sign_in(.:format)        admin/sessions#create 
    destroy_admin_session DELETE /admin/sign_out(.:format)       admin/sessions#destroy
       new_admin_password GET    /admin/password/new(.:format)   admin/passwords#new
      edit_admin_password GET    /admin/password/edit(.:format)  admin/passwords#edit
           admin_password PATCH  /admin/password(.:format)       admin/passwords#update
                          PUT    /admin/password(.:format)       admin/passwords#update
                          POST   /admin/password(.:format)       admin/passwords#create

あとは、routesからもregitrationsを消しておきましょう。
特に影響はないと思いますが、不要な記述は削除しておくべきかと思います。

routes
  registrations: 'admin/registrations' => #削除しましょう。

下記が、削除後のルーティングになります。

routes
Rails.application.routes.draw do
  devise_for :admin, controllers: {
  sessions:      'admin/sessions',
  passwords:     'admin/passwords',
  }

以上、たにーでした。

参考文献

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

ユーザーに管理者アカウントの新規登録をさせない方法

adminの新規登録を防ぐ

単純にadminの設定をしたままだと、
routesを見てもわかる通り、adminの新規会員登録ができてしまいます。

つまり、管理権限を持たない一般ユーザーでも管理者アカウントを作成できてしまいます。
セキュリティーとして問題大です。

解決方法としては、下記を実施。

解決方法

方法は、至って簡単です。
adminモデルファイルから:resisterableを削除

models/admin
:registerable, =>  #削除しましょう。

下記が、削除後の記述になります。

models/admin
class Admin < ApplicationRecord
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
  devise :database_authenticatable,:recoverable, :rememberable, :validatable
end

結果

ルーティングからregitrationが消えたと思います。

terminal
             Prefix Verb   URI        Pattern                    Controller#Action
        new_admin_session GET    /admin/sign_in(.:format)        admin/sessions#new
            admin_session POST   /admin/sign_in(.:format)        admin/sessions#create 
    destroy_admin_session DELETE /admin/sign_out(.:format)       admin/sessions#destroy
       new_admin_password GET    /admin/password/new(.:format)   admin/passwords#new
      edit_admin_password GET    /admin/password/edit(.:format)  admin/passwords#edit
           admin_password PATCH  /admin/password(.:format)       admin/passwords#update
                          PUT    /admin/password(.:format)       admin/passwords#update
                          POST   /admin/password(.:format)       admin/passwords#create

あとは、routesからもregitrationsを消しておきましょう。
特に影響はないと思いますが、不要な記述は削除しておくべきかと思います。

routes
  registrations: 'admin/registrations' => #削除しましょう。

下記が、削除後のルーティングになります。

routes
Rails.application.routes.draw do
  devise_for :admin, controllers: {
  sessions:      'admin/sessions',
  passwords:     'admin/passwords',
  }

以上、たにーでした。

参考文献

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

railsのfile_fieldにおける画像アップロードボタンのデザインの変更方法

環境

ruby 2.6.5
rails 6.0.0

やりたいこと

画像をアップロードする際に,アイコンをクリックするとファイル選択に移るようにしたい

実装

<%= f.label :image, class: "far fa-image" do %>
  <%= f.file_field :image, style:"display:none;" %>
<% end %>

上記のコードを任意のforループの中に挿入する.このときid値は同様のものにしておく必要がある.

あとがき

labelについての理解が浅いことがわかって良かったです.

参考文献

railsのfile_fieldで画像クリックによりアップロード
Railsのfile_fieldで画像クリックでアップロードしてプレビューを差し替える

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

【Rails】SendGridでメール送信(2021年3月)

SendGridの仕様がもろもろ変わったっぽいので改めて使い方をまとめる。

アカウント作成

うろ覚えだけど、日本の代理店(構造計画研究所)を通して契約すると、「サービス提供者のドメインのメールアドレスから申し込まない」みたいな制約があった記憶。受託開発とかだと面倒。
なので代理店を遠さずに、以下のURLからアカウントを作成した。

確認用メールが届くのでリンクを踏んで有効化。

sender identity(差出人情報)の登録

ログイン後の画面。
 2021-03-26 12.11.54.png

指示の通り、sender identityの登録を登録する。
「Create a single sender」「Authenticate a domain」の2つの方法があるけど、前者が推奨とのこと。

 2021-03-26 12.13.53.png

表示されるフォームに情報を入力する。
 2021-03-26 12.15.37.png

  • From Name
    • 受信者に表示される差出人名
  • From Email Address
    • メール送信者のメールアドレスとして表示される
    • このアドレスの持ち主かチェックするため、登録後このアドレスに確認メールが届く
      • リンク踏めばログインしなくてもverifyできる
  • Reply to
    • 受信者が返信する時の宛先にセットされるアドレス
  • Nickname
    • 差出人情報を一意に識別するための名前
    • この名前がメール受信者に表示されることはない

なお、このページを再度表示したい時はMarketing Campaigns > Sendersからアクセスできる。

Railsアプリからメールを送信

メール送信の2種類の方法

SendGridを使ったメール送信には「Web API」「SMTP」の2種類の方法がある。公式はWeb APIを推奨している。

注意点として、Web APIを使うと、ActionMailerを使ったメール送信が難しくなる。
https://github.com/eddiezane/sendgrid-actionmailer
https://techracho.bpsinc.jp/yamada/2018_12_22/67222
上記のように、WebAPIを使いながらActionMailerで送信するgemや手法がいくつかヒットしたが、私のRails6の環境ではうまくいかなかった。

今回は、Web APIを使い、Action Mailerは使わずにメールを送信することにした。

APIキーを取得

  • Email API > Integration Guide > Web API > Rubyを選択
  • 2.Create an API keyにAPIキーの名前(なんでも良い)を入力しCreate keyをクリック
  • 表示されたAPIキーを環境変数に保存

gemをインストール

Gemfile
gem 'sendgrid-ruby'
$ bundle install

メール送信処理を実装

$ touch app/models/send_email.rb
app/models/send_email.rb
class SendEmail
  require 'sendgrid-ruby'
  include SendGrid

  def self.test_email
    from = Email.new(email: 'dev@example.jp') # SendGridの管理画面でSenderに登録したアドレス
    to = Email.new(email: 'hogehoge@gmail.com') # 送信したいアドレス
    subject = 'テストホゲホゲ'
    content = Content.new(type: 'text/plain', value: 'ハローハロー')
    mail = Mail.new(from, subject, to, content)

    sg = SendGrid::API.new(api_key: ENV['SENDGRID_WEB_API_KEY'])
    response = sg.client.mail._('send').post(request_body: mail.to_json)
  end
end

送信テスト

$ rails c
> SendEmail.test_email
=> #<SendGrid::Response:0x00erererc9650
 @body="",
 @headers=
  {"server"=>["nginx"],
   "date"=>["Mon, 29 Mar 2021 02:47:15 GMT"],
   "content-length"=>["0"],
   "connection"=>["close"]

メールが届くことを確認

その他

メール送信のオプションは以下のAPI仕様書を確認

メール内のリンクがsendgrid用に置換されるのが嫌な場合、Settings > Tracking > Click Tracking設定から無効化できる。

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

gemの特定のバージョンが配信停止になった時の対処法(the author of mimemagic 0.3.5 has removed it)

エラー文

Fetching gem metadata from https://rubygems.org/............
Your bundle is locked to mimemagic (0.3.5), but that version could not be found
in any of the sources listed in your Gemfile. If you haven't changed sources,
that means the author of mimemagic (0.3.5) has removed it. You'll need to update
your bundle to a version other than mimemagic (0.3.5) that hasn't been removed
in order to install.

大事な部分切り取る

that means the author of mimemagic (0.3.5) has removed it. You'll need to update

解決方法

bundle update mimemagic
  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

Rails 6にTailwindCSSを導入して失敗【メモ書き】

背景

新しいアプリ(ボートフォリオ用)を作成のためTailwind CSSを導入に挑む
新たな技術を学んでサクサク作れるようになれればよき
今回もQiitaさんに投稿されている方々にお世話になりました、ありがとうございます

参考文献
Tailwind on Rails
RailsにTailwindCSSを導入

開発環境

  • Ruby 3.0.0
  • Rails 6.1.3.1
  • tailwindcss 2.0.4

作業工程

まずは@d0ne1sさんが投稿してくださった「Tailwind on Rails」の手順で進める

$ yarn add tailwindcss
$ yarn tailwindcss init
$ mkdir app/javascript/css
$ touch app/javascript/css/tailwind.css
app/javascript/css/tailwind.css
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
app/javascript/packs/application.js
import Rails from "@rails/ujs"
import Turbolinks from "turbolinks"
import "channels"

import '../css/tailwind.css'; // 追記

Rails.start()
Turbolinks.start()
postcss.config.js
module.exports = {
  plugins: [
    require('postcss-import'),
    require('postcss-flexbugs-fixes'),
    require("tailwindcss"),  // 追記
    require("autoprefixer"), // 追記
    require('postcss-preset-env')({
      autoprefixer: {
        flexbox: 'no-2009'
      },
      stage: 3
    })
  ]
}
app/views/layouts/application.html.erb
// 削除 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
// 追記 <%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>

これで準備は整ったはず!!
では動作確認を行うため準備を・・・・

app/views/tests/index.html.erb
<div class="max-w-sm mx-auto bg-white shadow-lg rounded-lg overflow-hidden">
  <div class="sm:flex sm:items-center px-6 py-4">
    <img class="block mx-auto sm:mx-0 sm:flex-shrink-0 h-16 sm:h-24 rounded-full" src="https://randomuser.me/api/portraits/women/17.jpg" alt="Woman's Face">
    <div class="mt-4 sm:mt-0 sm:ml-4 text-center sm:text-left">
      <p class="text-xl leading-tight">Erin Lindford</p>
      <p class="text-sm leading-tight text-gray-600">Customer Support Specialist</p>
      <div class="mt-4">
        <button class="text-purple-500 hover:text-white hover:bg-purple-500 border border-purple-500 text-xs font-semibold rounded-full px-4 py-1 leading-normal">Message</button>
      </div>
    </div>
  </div>
</div>

動作確認

では準備が出来たので「rails s」っと
あ、うまくいってませんでした・・・・
image.png
うまくいくと下記のサイトに載ってる状態になるみたいです
RailsでTailwind CSSを使用する

作業工程2

次に@kazuya_minei109さんが投稿してくださったRailsにTailwindCSSを導入の手順も行う

デフォルトで入っているWebpackerを削除して、
新しいWebpackerを追加を実施

$ yarn remove @rails/webpacker
$ yarn add rails/webpacker#b6c2180

gem spring アンインストールを実施

$ bundle exec gem uninstall spring
# gem 'spring'  #念の為にコメントアウト
$ bundle install

次に、TailwindsCSS、PostCSS、Autopfrefixer、Tailwindプラグインをインストール

yarn add tailwindcss postcss autoprefixer @tailwindcss/forms @tailwindcss/typography @tailwindcss/aspect-ratio

この段階で動作確認を実施
rails sっと・・・・
スクリーンショット 2021-03-29 11.25.20.png

上手くいってるな・・・・

少し調査

ここから場合分けで色々試してみた結果

  • デフォルトで入っているWebpackerを削除
  • 新しいWebpackerを追加を実施
  • PostCSSのインストール
$ yarn remove @rails/webpacker
$ yarn add rails/webpacker#b6c2180
$ yarn add postcss

上記が必要であった
下記の
「tailwindcss」は既にインストール済であったこと
「autoprefixer」は postcss.config.jsに追記してあったこと
「@tailwindcss/〜」はtailwindsccのプラグイン各種をインストールすること
そのため、あまり関係ないかと思います

さいごに

PostCSSについても少し調べてみた
Rails & Webpacker環境でPostCSSを使う
しかし、理解が追いつきませんでした!!
少しずつ学んでいくしかないかな

参考文献

Tailwind on Rails
RailsにTailwindCSSを導入
RailsでTailwind CSSを使用する
Rails & Webpacker環境でPostCSSを使う

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

【エラー】自動デプロイの際のエラー【AWS】

Aws::Sigv4::Errors::MissingCredentialsError

アプリを自動デプロイした際、下記のようなエラーが出現。
※アプリのサーバには、EC2、unicorn、Nginxを利用

Aws::Sigv4::Errors::MissingCredentialsError: Cannot load `Rails.config.active_storage.service`:
missing credentials, provide credentials with one of the following options:
  - :access_key_id and :secret_access_key
  - :credentials
  - :credentials_provider

※上記のエラー内容は下記の方法にて確認した。
(ターミナルにて、EC2にログインし下記コマンドを入力。)

[ec2-user@ip-000-00-0-000 アプリ名]$ cd current
[ec2-user@ip-000-00-0-000 current]$ cd log
[ec2-user@ip-000-00-0-000 log]$ cat unicorn.stderr.log

結論

EC2の環境変数にAWSのアクセスキーが設定がされておらず、デプロイ時にActive storageが読み込まれなかった事が原因。

【EC2に環境変数の設定を行う方法】
EC2にログインした状態で下記コマンドを入力。

[ec2-user@ip-000-00-00-000 ~]$ sudo vim /etc/environment

i を入力し、入力モードに変更。

AWS_ACCESS_KEY_ID='Access key ID'
AWS_SECRET_ACCESS_KEY='Secret access key'

アクセスキーの入力が完了したら、「esc」キー → 「:wq」の順に入力。
設定した環境変数が反映されているかを確認する為、exitコマンドにてログアウト。

[ec2-user@ip-172-31-23-189 ~]$ exit
  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

mapとeachの違い

map

配列の入った変数.map {|変数名| 処理内容 }

food = ["fish", "beef", "banana","potato"]
food.map {|a| a.length}

#元の配列の変更していない
#戻り値は [4, 4, 6, 6]

map!(破壊的メソッド)

配列の入った変数.map! {|変数名| 処理内容 }

food = ["fish", "beef", "banana","potato"]
food.map! {|a| a.length}

#元の配列の変更している
#戻り値は [4, 4, 6, 6]

each(mapとの違い)

food = ["fish", "beef", "banana","potato"]
food.each {|a| a.length}

#戻り値がもとの配列を返す
#戻り値は ["fish", "beef", "banana","potato"]
  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

Railsで日本時刻にする方法

投稿時刻の表示を変更しよう application.rbの編集 application.rb module ShoApp class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.0 config.i18n.default_locale = :ja config.time_zone = 'Tokyo' # 中略 ja.ymlファイルを作成して、表示する時刻のフォーマットを設定 config/locales/ja.yml ja: time: formats: default: "%Y/%m/%d %H:%M:%S" 続いて、この時刻設定を元に、lメソッドを利用して、表示する時刻へ反映させます。 lメソッド l(エル)メソッドは、日付や時刻を表示するRailsのメソッドです。 国や地域によって時刻は異なりますが、lメソッドを使えば指定した現地時間に対応できます。 app/views/messages/_message.html.erb <div class="message"> <div class="upper-message"> <div class="message-user"> <!-- 投稿したユーザー名情報を出力する --> <%= message.user.name %> </div> <div class="message-date"> <!-- 投稿した時刻を出力する --> <%= l message.created_at %>   #ここ修正 </div> </div> <div class="lower-message"> <div class="message-content"> <!-- 投稿したメッセージ内容を記述する --> <%= message.content %> </div> </div> </div>
  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

Rails (V1::Auth::Customers::ConfirmationsController, but didn't (Zeitwerk::NameError))

railsのプロジェクトをEc2にデプロイしたのち、rails console -e productionを行うと次にようなエラーが

[ec2-user@ip-10-0-0-93 room_backend]$ /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader/callbacks.rb:18:in `on_file_autoloaded': expected file /var/www/room_backend/app/controllers/v1/auth/customers/confirmations_controller.rb to define constant V1::Auth::Customers::ConfirmationsController, but didn't (Zeitwerk::NameError)
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:27:in `block in require'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `tap'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:409:in `const_get'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:409:in `block (2 levels) in eager_load'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:733:in `block in ls'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:725:in `foreach'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:725:in `ls'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:404:in `block in eager_load'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:393:in `synchronize'
    from /home/ec2-user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:393:in `eager_load'
以下略

エラー名は Zeitwerk::NameError とのこと
ググってみるとスタックオーバーフローにおんなじような記事があったので処置したら治りました

解決法

config/application.rb
class Application < Rails::Application
   config.load_defaults 6.0
   #下の一行を追加する
   config.autoloader = :classic
end
  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

【Rails】Rubocopによるコード解析と修正の方法(airbnb設定)

Rubocopとは

Ruby(Rails)のコードが、コーディング規約に則っているか解析し、修正までしてくれるgem(=静的コード解析ツール)。
*開発現場では、コードの可読性や統一性を保つために、企業やプロジェクト単位で「コードの書き方のルール(コーディング規約)」が設けられていることが多い。

Rubocopには様々な設定がある

Rubocopが解析する際の基準となるコーディング規約は、上述の通り、あくまで企業やプロジェクト単位で決められたルールなのでバラバラですよね。

そんな中、今回はairbnbで使用されている設定を使用します。

準備

  1. Gemfileに以下追記 + bundle install

    Gemfile
    group :development do
    #中略
      gem 'rubocop-airbnb'
    end
    
  2. 設定ファイルの作成
    アプリケーションフォルダ配下(appと同じ階層)に、.rubocop.yml、.rubocop_airbnb.ymlを作成。

  3. 設定ファイルの編集

.rubocop.yml
inherit_from:
  - .rubocop_airbnb.yml

#ここにはrubocopでコード解析したくないファイルやフォルダを指定
AllCops:
  Exclude:
    - 'db/**/*'
    - 'bin/*'
    - 'config/environments/*'
    - 'config/application.rb'
    - 'config/initializers/*'
    - 'config/spring.rb'
    - 'lib/tasks/*'
    - 'vendor/**/*'
    - 'path/ruby'
rubocop_airbnb.yml
require:
  - rubocop-airbnb

実行

1. 違反箇所の解析

bundle exec rubocop —-require rubocop-airbnb

2. 違反箇所の修正

基本的には、検証で使用したコマンドに-aオプションをつけて、解析対象を指定すれば良いだけ。

  • ファイル・フォルダ指定:bundle exec rubocop --require rubocop-airbnb -a {解析対象ファイルorフォルダ}

  • origin/mainと差分があるファイルを指定:bundle exec rubocop --require rubocop-airbnb -a $(git diff $(git merge-base origin/master HEAD) —diff-filter=d —name-only)

最後に

-aオプションで自動修正してくれる違反は全てではありません。また、公式ドキュメントでも-aは実験的オプションとありますので、使用には注意してください。

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

初心者がmacにRuby on Rails環境を構築した話

この記事で書くこと

macにRuby on Rails環境を構築したときのメモ。
途中、webpacker, Node.js, yarn がインストールされていない等の問題が発生したが、これらの解決策についても記載。

対象読者 ( = 筆者のレベル)

Progate1周したばかり、くらいの初心者。

環境

macOS Catalina 10.15.7
MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
 2GHz クアッドコアIntel Core i5
 16GB 3733 MHz LPDDR4X
シェル zsh
ターミナル iTerm2 Build 3.4.4
Ruby 2.7.2
Homebrew 3.0.7
rbenv 1.1.2

事前準備

Homebrew, rbenv をインストールしておく。
私が上記インストールを実施した際に遭遇したエラーの解決方法はこの記事に記載した。

実施事項

1. rails のインストール

インストール

zsh
% gem install rails

インストールが完了したか確認

正常にインストールできていない模様。
本来はバージョンが表示されるはず。

zsh
% rails -v
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command. 

パスを通す

zsh
% export PATH="$HOME/.rbenv/shims:$PATH"

再度インストールが完了したか確認

今度は問題なし。

zsh
% rails -v
Rails 6.1.3

2. サンプルアプリを作成する

zsh
% rails new sample_app

3. railsサーバーの起動 (1回目)

どうやらrailsサーバーを起動できていない模様。
ターミナル上に表記された文字列を確認すると、
/Users/username/Documents/Rails/sample_app/config/webpacker.yml
が存在しないらしい。

zsh
% rails s


結果はここをクリックして確認
結果
=> Booting Puma
=> Rails 6.1.3 application starting in development 
=> Run `bin/rails server --help` for more startup options
Exiting
Traceback (most recent call last):
    76: from bin/rails:2:in `<main>'
    75: from bin/rails:2:in `load'
    74: from /Users/username/Documents/Rails/sample_app/bin/spring:7:in `<top (required)>'
    73: from /Users/username/Documents/Rails/sample_app/bin/spring:7:in `tap'
    72: from /Users/username/Documents/Rails/sample_app/bin/spring:10:in `block in <top (required)>'
    71: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
    70: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
    69: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
    68: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
    67: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
    66: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
    65: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
    64: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
    63: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
    62: from /Users/username/Documents/Rails/sample_app/bin/rails:5:in `<top (required)>'
    61: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    60: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    59: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    58: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    57: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    56: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands.rb:18:in `<main>'
    55: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/command.rb:50:in `invoke'
    54: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/command/base.rb:69:in `perform'
    53: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
    52: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
    51: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
    50: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:135:in `perform'
    49: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:135:in `tap'
    48: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:144:in `block in perform'
    47: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:37:in `start'
    46: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
    45: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
    44: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
    43: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
    42: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
    41: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
    40: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
    39: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
    38: from config.ru:3:in `block in <main>'
    37: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
    36: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in `require'
    35: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:299:in `load_dependency'
    34: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in `block in require'
    33: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
    32: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    31: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    30: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    29: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    28: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    27: from /Users/username/Documents/Rails/sample_app/config/environment.rb:5:in `<main>'
    26: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/application.rb:384:in `initialize!'
    25: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:60:in `run_initializers'
    24: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
    23: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
    22: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
    21: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `call'
    20: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each'
    19: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
    18: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
    17: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    16: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
    15: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:61:in `block in run_initializers'
    14: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in `run'
    13: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in `instance_exec'
    12: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/railtie.rb:41:in `block in <class:Engine>'
    11: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker.rb:35:in `bootstrap'
    10: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/commands.rb:47:in `bootstrap'
     9: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:18:in `refresh'
     8: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:83:in `load'
     7: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:51:in `public_manifest_path'
     6: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:47:in `public_output_path'
     5: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:43:in `public_path'
     4: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:88:in `fetch'
     3: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:92:in `data'
     2: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:96:in `load'
     1: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:96:in `read'
/Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:96:in `read': No such file or directory @ rb_sysopen - /Users/username/Documents/Rails/sample_app/config/webpacker.yml (Errno::ENOENT)
    75: from bin/rails:2:in `<main>'
    74: from bin/rails:2:in `load'
    73: from /Users/username/Documents/Rails/sample_app/bin/spring:7:in `<top (required)>'
    72: from /Users/username/Documents/Rails/sample_app/bin/spring:7:in `tap'
    71: from /Users/username/Documents/Rails/sample_app/bin/spring:10:in `block in <top (required)>'
    70: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
    69: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
    68: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
    67: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
    66: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
    65: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
    64: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
    63: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
    62: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
    61: from /Users/username/Documents/Rails/sample_app/bin/rails:5:in `<top (required)>'
    60: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    59: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    58: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    57: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    56: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    55: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands.rb:18:in `<main>'
    54: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/command.rb:50:in `invoke'
    53: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/command/base.rb:69:in `perform'
    52: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
    51: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
    50: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
    49: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:135:in `perform'
    48: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:135:in `tap'
    47: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:144:in `block in perform'
    46: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:37:in `start'
    45: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
    44: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
    43: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
    42: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
    41: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
    40: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
    39: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
    38: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
    37: from config.ru:3:in `block in <main>'
    36: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
    35: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in `require'
    34: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:299:in `load_dependency'
    33: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3/lib/active_support/dependencies.rb:332:in `block in require'
    32: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
    31: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    30: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    29: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    28: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    27: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    26: from /Users/username/Documents/Rails/sample_app/config/environment.rb:5:in `<main>'
    25: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/application.rb:384:in `initialize!'
    24: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:60:in `run_initializers'
    23: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
    22: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
    21: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
    20: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `call'
    19: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each'
    18: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
    17: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
    16: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    15: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
    14: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:61:in `block in run_initializers'
    13: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in `run'
    12: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/initializable.rb:32:in `instance_exec'
    11: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/railtie.rb:41:in `block in <class:Engine>'
    10: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker.rb:35:in `bootstrap'
     9: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/commands.rb:47:in `bootstrap'
     8: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:18:in `refresh'
     7: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/manifest.rb:83:in `load'
     6: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:51:in `public_manifest_path'
     5: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:47:in `public_output_path'
     4: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:43:in `public_path'
     3: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:88:in `fetch'
     2: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:92:in `data'
     1: from /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:95:in `load'
/Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:99:in `rescue in load': Webpacker configuration file not found /Users/username/Documents/Rails/sample_app/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/username/Documents/Rails/sample_app/config/webpacker.yml (RuntimeError)


4. webpacker のインストール (1回目)

このQiita記事を参考にして、webpackerインストールを試したが、失敗。
ターミナル上の文字列を確認すると、Node.jsがインストールされていない模様。

zsh
% rails webpacker:install
sh: node: command not found
sh: nodejs: command not found
Node.js not installed. Please download and install Node.js https://nodejs.org/en/download/
Exiting!

5. Node.js のインストール

このQiita記事を参考にして、Node.jsをインストール。
記事内では、下記の流れで説明があったが、私はHomebrewについては既にインストール済みなので、2,3を実施した。

  1. Homebrewのインストール
  2. nodebrewのインストール
  3. Node.jsのインストール

(1) nodebrewのインストール

zsh
% brew install nodebrew
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
openmodelica                             sqlancer
==> Updated Formulae
Updated 32 formulae.
==> New Casks
n1ghtshade
==> Updated Casks
Updated 17 casks.

==> Downloading https://github.com/hokaccha/nodebrew/archive/v1.0.1.tar.gz
==> Downloading from https://codeload.github.com/hokaccha/nodebrew/tar.gz/v1.0.1
##O#- #                                                                       
==> Caveats
You need to manually run setup_dirs to create directories required by nodebrew:
  /usr/local/opt/nodebrew/bin/nodebrew setup_dirs

Add path:
  export PATH=$HOME/.nodebrew/current/bin:$PATH

To use Homebrew's directories rather than ~/.nodebrew add to your profile:
  export NODEBREW_ROOT=/usr/local/var/nodebrew

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
?  /usr/local/Cellar/nodebrew/1.0.1: 8 files, 38.7KB, built in 3 seconds

インストールが完了したか確認

正常にインストール完了していることを確認。

zsh
% nodebrew -v
nodebrew 1.0.1

Usage:
    nodebrew help                         Show this message
    nodebrew install <version>            Download and install <version> (from binary)
    nodebrew compile <version>            Download and install <version> (from source)
    nodebrew install-binary <version>     Alias of `install` (For backword compatibility)
    nodebrew uninstall <version>          Uninstall <version>
    nodebrew use <version>                Use <version>
    nodebrew list                         List installed versions
    nodebrew ls                           Alias for `list`
    nodebrew ls-remote                    List remote versions
    nodebrew ls-all                       List remote and installed versions
    nodebrew alias <key> <value>          Set alias
    nodebrew unalias <key>                Remove alias
    nodebrew clean <version> | all        Remove source file
    nodebrew selfupdate                   Update nodebrew
    nodebrew migrate-package <version>    Install global NPM packages contained in <version> to current version
    nodebrew exec <version> -- <command>  Execute <command> using specified <version>

Example:
    # install
    nodebrew install v8.9.4

    # use a specific version number
    nodebrew use v8.9.4

(2) Node.jsのインストール

インストール可能なバージョンを確認

zsh
% nodebrew ls-remote


結果はここをクリックして確認
結果
v0.0.1    v0.0.2    v0.0.3    v0.0.4    v0.0.5    v0.0.6    

v0.1.0    v0.1.1    v0.1.2    v0.1.3    v0.1.4    v0.1.5    v0.1.6    v0.1.7
v0.1.8    v0.1.9    v0.1.10   v0.1.11   v0.1.12   v0.1.13   v0.1.14   v0.1.15
v0.1.16   v0.1.17   v0.1.18   v0.1.19   v0.1.20   v0.1.21   v0.1.22   v0.1.23
v0.1.24   v0.1.25   v0.1.26   v0.1.27   v0.1.28   v0.1.29   v0.1.30   v0.1.31
v0.1.32   v0.1.33   v0.1.90   v0.1.91   v0.1.92   v0.1.93   v0.1.94   v0.1.95
v0.1.96   v0.1.97   v0.1.98   v0.1.99   v0.1.100  v0.1.101  v0.1.102  v0.1.103
v0.1.104  

v0.2.0    v0.2.1    v0.2.2    v0.2.3    v0.2.4    v0.2.5    v0.2.6    

v0.3.0    v0.3.1    v0.3.2    v0.3.3    v0.3.4    v0.3.5    v0.3.6    v0.3.7
v0.3.8    

v0.4.0    v0.4.1    v0.4.2    v0.4.3    v0.4.4    v0.4.5    v0.4.6    v0.4.7
v0.4.8    v0.4.9    v0.4.10   v0.4.11   v0.4.12   

v0.5.0    v0.5.1    v0.5.2    v0.5.3    v0.5.4    v0.5.5    v0.5.6    v0.5.7
v0.5.8    v0.5.9    v0.5.10   

v0.6.0    v0.6.1    v0.6.2    v0.6.3    v0.6.4    v0.6.5    v0.6.6    v0.6.7
v0.6.8    v0.6.9    v0.6.10   v0.6.11   v0.6.12   v0.6.13   v0.6.14   v0.6.15
v0.6.16   v0.6.17   v0.6.18   v0.6.19   v0.6.20   v0.6.21   

v0.7.0    v0.7.1    v0.7.2    v0.7.3    v0.7.4    v0.7.5    v0.7.6    v0.7.7
v0.7.8    v0.7.9    v0.7.10   v0.7.11   v0.7.12   

v0.8.0    v0.8.1    v0.8.2    v0.8.3    v0.8.4    v0.8.5    v0.8.6    v0.8.7
v0.8.8    v0.8.9    v0.8.10   v0.8.11   v0.8.12   v0.8.13   v0.8.14   v0.8.15
v0.8.16   v0.8.17   v0.8.18   v0.8.19   v0.8.20   v0.8.21   v0.8.22   v0.8.23
v0.8.24   v0.8.25   v0.8.26   v0.8.27   v0.8.28   

v0.9.0    v0.9.1    v0.9.2    v0.9.3    v0.9.4    v0.9.5    v0.9.6    v0.9.7
v0.9.8    v0.9.9    v0.9.10   v0.9.11   v0.9.12   

v0.10.0   v0.10.1   v0.10.2   v0.10.3   v0.10.4   v0.10.5   v0.10.6   v0.10.7
v0.10.8   v0.10.9   v0.10.10  v0.10.11  v0.10.12  v0.10.13  v0.10.14  v0.10.15
v0.10.16  v0.10.17  v0.10.18  v0.10.19  v0.10.20  v0.10.21  v0.10.22  v0.10.23
v0.10.24  v0.10.25  v0.10.26  v0.10.27  v0.10.28  v0.10.29  v0.10.30  v0.10.31
v0.10.32  v0.10.33  v0.10.34  v0.10.35  v0.10.36  v0.10.37  v0.10.38  v0.10.39
v0.10.40  v0.10.41  v0.10.42  v0.10.43  v0.10.44  v0.10.45  v0.10.46  v0.10.47
v0.10.48  

v0.11.0   v0.11.1   v0.11.2   v0.11.3   v0.11.4   v0.11.5   v0.11.6   v0.11.7
v0.11.8   v0.11.9   v0.11.10  v0.11.11  v0.11.12  v0.11.13  v0.11.14  v0.11.15
v0.11.16  

v0.12.0   v0.12.1   v0.12.2   v0.12.3   v0.12.4   v0.12.5   v0.12.6   v0.12.7
v0.12.8   v0.12.9   v0.12.10  v0.12.11  v0.12.12  v0.12.13  v0.12.14  v0.12.15
v0.12.16  v0.12.17  v0.12.18  

v4.0.0    v4.1.0    v4.1.1    v4.1.2    v4.2.0    v4.2.1    v4.2.2    v4.2.3
v4.2.4    v4.2.5    v4.2.6    v4.3.0    v4.3.1    v4.3.2    v4.4.0    v4.4.1
v4.4.2    v4.4.3    v4.4.4    v4.4.5    v4.4.6    v4.4.7    v4.5.0    v4.6.0
v4.6.1    v4.6.2    v4.7.0    v4.7.1    v4.7.2    v4.7.3    v4.8.0    v4.8.1
v4.8.2    v4.8.3    v4.8.4    v4.8.5    v4.8.6    v4.8.7    v4.9.0    v4.9.1


v5.0.0    v5.1.0    v5.1.1    v5.2.0    v5.3.0    v5.4.0    v5.4.1    v5.5.0
v5.6.0    v5.7.0    v5.7.1    v5.8.0    v5.9.0    v5.9.1    v5.10.0   v5.10.1
v5.11.0   v5.11.1   v5.12.0   

v6.0.0    v6.1.0    v6.2.0    v6.2.1    v6.2.2    v6.3.0    v6.3.1    v6.4.0
v6.5.0    v6.6.0    v6.7.0    v6.8.0    v6.8.1    v6.9.0    v6.9.1    v6.9.2
v6.9.3    v6.9.4    v6.9.5    v6.10.0   v6.10.1   v6.10.2   v6.10.3   v6.11.0
v6.11.1   v6.11.2   v6.11.3   v6.11.4   v6.11.5   v6.12.0   v6.12.1   v6.12.2
v6.12.3   v6.13.0   v6.13.1   v6.14.0   v6.14.1   v6.14.2   v6.14.3   v6.14.4
v6.15.0   v6.15.1   v6.16.0   v6.17.0   v6.17.1   

v7.0.0    v7.1.0    v7.2.0    v7.2.1    v7.3.0    v7.4.0    v7.5.0    v7.6.0
v7.7.0    v7.7.1    v7.7.2    v7.7.3    v7.7.4    v7.8.0    v7.9.0    v7.10.0
v7.10.1   

v8.0.0    v8.1.0    v8.1.1    v8.1.2    v8.1.3    v8.1.4    v8.2.0    v8.2.1
v8.3.0    v8.4.0    v8.5.0    v8.6.0    v8.7.0    v8.8.0    v8.8.1    v8.9.0
v8.9.1    v8.9.2    v8.9.3    v8.9.4    v8.10.0   v8.11.0   v8.11.1   v8.11.2
v8.11.3   v8.11.4   v8.12.0   v8.13.0   v8.14.0   v8.14.1   v8.15.0   v8.15.1
v8.16.0   v8.16.1   v8.16.2   v8.17.0   

v9.0.0    v9.1.0    v9.2.0    v9.2.1    v9.3.0    v9.4.0    v9.5.0    v9.6.0
v9.6.1    v9.7.0    v9.7.1    v9.8.0    v9.9.0    v9.10.0   v9.10.1   v9.11.0
v9.11.1   v9.11.2   

v10.0.0   v10.1.0   v10.2.0   v10.2.1   v10.3.0   v10.4.0   v10.4.1   v10.5.0
v10.6.0   v10.7.0   v10.8.0   v10.9.0   v10.10.0  v10.11.0  v10.12.0  v10.13.0
v10.14.0  v10.14.1  v10.14.2  v10.15.0  v10.15.1  v10.15.2  v10.15.3  v10.16.0
v10.16.1  v10.16.2  v10.16.3  v10.17.0  v10.18.0  v10.18.1  v10.19.0  v10.20.0
v10.20.1  v10.21.0  v10.22.0  v10.22.1  v10.23.0  v10.23.1  v10.23.2  v10.23.3
v10.24.0  

v11.0.0   v11.1.0   v11.2.0   v11.3.0   v11.4.0   v11.5.0   v11.6.0   v11.7.0
v11.8.0   v11.9.0   v11.10.0  v11.10.1  v11.11.0  v11.12.0  v11.13.0  v11.14.0
v11.15.0  

v12.0.0   v12.1.0   v12.2.0   v12.3.0   v12.3.1   v12.4.0   v12.5.0   v12.6.0
v12.7.0   v12.8.0   v12.8.1   v12.9.0   v12.9.1   v12.10.0  v12.11.0  v12.11.1
v12.12.0  v12.13.0  v12.13.1  v12.14.0  v12.14.1  v12.15.0  v12.16.0  v12.16.1
v12.16.2  v12.16.3  v12.17.0  v12.18.0  v12.18.1  v12.18.2  v12.18.3  v12.18.4
v12.19.0  v12.19.1  v12.20.0  v12.20.1  v12.20.2  v12.21.0  

v13.0.0   v13.0.1   v13.1.0   v13.2.0   v13.3.0   v13.4.0   v13.5.0   v13.6.0
v13.7.0   v13.8.0   v13.9.0   v13.10.0  v13.10.1  v13.11.0  v13.12.0  v13.13.0
v13.14.0  

v14.0.0   v14.1.0   v14.2.0   v14.3.0   v14.4.0   v14.5.0   v14.6.0   v14.7.0
v14.8.0   v14.9.0   v14.10.0  v14.10.1  v14.11.0  v14.12.0  v14.13.0  v14.13.1
v14.14.0  v14.15.0  v14.15.1  v14.15.2  v14.15.3  v14.15.4  v14.15.5  v14.16.0


v15.0.0   v15.0.1   v15.1.0   v15.2.0   v15.2.1   v15.3.0   v15.4.0   v15.5.0
v15.5.1   v15.6.0   v15.7.0   v15.8.0   v15.9.0   v15.10.0  v15.11.0  

io@v1.0.0 io@v1.0.1 io@v1.0.2 io@v1.0.3 io@v1.0.4 io@v1.1.0 io@v1.2.0 io@v1.3.0
io@v1.4.1 io@v1.4.2 io@v1.4.3 io@v1.5.0 io@v1.5.1 io@v1.6.0 io@v1.6.1 io@v1.6.2
io@v1.6.3 io@v1.6.4 io@v1.7.1 io@v1.8.1 io@v1.8.2 io@v1.8.3 io@v1.8.4 

io@v2.0.0 io@v2.0.1 io@v2.0.2 io@v2.1.0 io@v2.2.0 io@v2.2.1 io@v2.3.0 io@v2.3.1
io@v2.3.2 io@v2.3.3 io@v2.3.4 io@v2.4.0 io@v2.5.0 

io@v3.0.0 io@v3.1.0 io@v3.2.0 io@v3.3.0 io@v3.3.1 


インストール

・バージョンを直接指定するときは version名
・最新版を取得する時は latest
・安定版を取得する時は stable
今回は stable とした。

zsh
% nodebrew install-binary stable
Fetching: https://nodejs.org/dist/v14.16.0/node-v14.16.0-darwin-x64.tar.gz
Warning: Failed to create the file 
Warning: /Users/username/.nodebrew/src/v14.16.0/node-v14.16.0-darwin-x64.tar.
Warning: gz: No such file or directory

curl: (23) Failed writing body (0 != 978)
download failed: https://nodejs.org/dist/v14.16.0/node-v14.16.0-darwin-x64.tar.gz

上記のとおりディレクトリが存在しないというエラーが出たので、作成。

zsh
% mkdir -p ~/.nodebrew/src

ディレクトリ作成後、再度インストールし、成功した。

zsh
% nodebrew install-binary stable
Fetching: https://nodejs.org/dist/v14.16.0/node-v14.16.0-darwin-x64.tar.gz
######################################################################### 100.0%
Installed successfully

インストール後の処理① 有効化

上記の記事と同じだが、一応私の実施内容とその結果も掲載。
インストールバージョンの確認。

zsh
% nodebrew ls
v14.16.0

current: none

current: none 有効化されているバージョンはない、の意味。
下記にてバージョンを指定して有効化する。

zsh
% nodebrew use v14.16.0

有効化されているか確認。

zsh
% nodebrew ls
v14.16.0

current: v14.16.0

インストール後の処理② 環境パスを通す

zsh
% echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile

インストール後の処理③ 最終確認

nodeが使用可能か確認。

zsh
% node -v
v14.16.0

6. webpacker のインストール (2回目)

4. webpacker のインストール (1回目) の時とは異なるエラーメッセージ。
Yarn がインストールされていない模様。

zsh
% rails webpacker:install
Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
Exiting!

7. yarn のインストール

このQiita記事に基本的には従って実施。

(1) インストールされているか確認

インストールされていない。

zsh
% yarn -v
zsh: command not found: yarn

(2) インストール

zsh
% brew install yarn
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 6 casks.

==> Downloading https://homebrew.bintray.com/bottles/icu4c-68.2.catalina.bottle.
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/fdc2f15705175478dc166
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/node-15.11.0.catalina.bottl
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/1dc4ea77c4196c8376eb6
######################################################################## 100.0%
==> Downloading https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz
==> Downloading from https://github-releases.githubusercontent.com/49970642/30fd
######################################################################## 100.0%
==> Installing dependencies for yarn: icu4c and node
==> Installing yarn dependency: icu4c
==> Pouring icu4c-68.2.catalina.bottle.tar.gz
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH, run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

==> Summary
?  /usr/local/Cellar/icu4c/68.2: 259 files, 72.5MB
==> Installing yarn dependency: node
==> Pouring node-15.11.0.catalina.bottle.tar.gz
?  /usr/local/Cellar/node/15.11.0: 3,298 files, 56.5MB
==> Installing yarn
?  /usr/local/Cellar/yarn/1.22.10: 15 files, 5MB, built in 3 seconds
==> Caveats
==> icu4c
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH, run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

(3) インストールが完了したか確認

正常にインストールされていることを確認。

zsh
% yarn -v          
1.22.10

(4) yarn install を実行

このQiita記事によると、

yarn install を実行して、package.json にリスト化されている全ての依存関係を node_modules 内にインストールする。

ことが必要なようだ。
今の私の知識では意味が理解できていないが、とりあえず実行しておく。

zsh
% yarn install
yarn install v1.22.10
info No lockfile found.
[1/4] ?  Resolving packages...
[2/4] ?  Fetching packages...
[3/4] ?  Linking dependencies...
[4/4] ?  Building fresh packages...
success Saved lockfile.
✨  Done in 1.30s.

8. webpacker のインストール (3回目)

3回目にしてようやくインストール完了。

zsh
% rails webpacker:install


結果はここから確認
結果
      create  config/webpacker.yml
Copying webpack core config
      create  config/webpack
      create  config/webpack/development.js
      create  config/webpack/environment.js
      create  config/webpack/production.js
      create  config/webpack/test.js
Copying postcss.config.js to app root directory
      create  postcss.config.js
Copying babel.config.js to app root directory
      create  babel.config.js
Copying .browserslistrc to app root directory
      create  .browserslistrc
The JavaScript app source directory already exists
       apply  /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.2.1/lib/install/binstubs.rb
  Copying binstubs
       exist    bin
      create    bin/webpack
      create    bin/webpack-dev-server
      append  .gitignore
Installing all JavaScript dependencies [5.2.1]
         run  yarn add @rails/webpacker@5.2.1 from "."
yarn add v1.22.10
[1/4] ?  Resolving packages...
warning @rails/webpacker > node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > node-sass > request > har-validator@5.1.5: this library is no longer supported
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] ?  Fetching packages...
[3/4] ?  Linking dependencies...
[4/4] ?  Building fresh packages...
success Saved lockfile.
success Saved 606 new dependencies.
info Direct dependencies
└─ @rails/webpacker@5.2.1
info All dependencies
├─ @babel/code-frame@7.12.13
├─ @babel/compat-data@7.13.8
├─ @babel/core@7.13.8
├─ @babel/helper-builder-binary-assignment-operator-visitor@7.12.13
├─ @babel/helper-compilation-targets@7.13.8
├─ @babel/helper-explode-assignable-expression@7.13.0
├─ @babel/helper-get-function-arity@7.12.13
├─ @babel/helper-hoist-variables@7.13.0
├─ @babel/helper-replace-supers@7.13.0
├─ @babel/helper-wrap-function@7.13.0
├─ @babel/helpers@7.13.0
├─ @babel/highlight@7.13.8
├─ @babel/parser@7.13.9
├─ @babel/plugin-proposal-async-generator-functions@7.13.8
├─ @babel/plugin-proposal-class-properties@7.13.0
├─ @babel/plugin-proposal-dynamic-import@7.13.8
├─ @babel/plugin-proposal-export-namespace-from@7.12.13
├─ @babel/plugin-proposal-json-strings@7.13.8
├─ @babel/plugin-proposal-logical-assignment-operators@7.13.8
├─ @babel/plugin-proposal-nullish-coalescing-operator@7.13.8
├─ @babel/plugin-proposal-numeric-separator@7.12.13
├─ @babel/plugin-proposal-object-rest-spread@7.13.8
├─ @babel/plugin-proposal-optional-catch-binding@7.13.8
├─ @babel/plugin-proposal-optional-chaining@7.13.8
├─ @babel/plugin-proposal-private-methods@7.13.0
├─ @babel/plugin-proposal-unicode-property-regex@7.12.13
├─ @babel/plugin-syntax-class-properties@7.12.13
├─ @babel/plugin-syntax-top-level-await@7.12.13
├─ @babel/plugin-transform-arrow-functions@7.13.0
├─ @babel/plugin-transform-async-to-generator@7.13.0
├─ @babel/plugin-transform-block-scoped-functions@7.12.13
├─ @babel/plugin-transform-block-scoping@7.12.13
├─ @babel/plugin-transform-classes@7.13.0
├─ @babel/plugin-transform-computed-properties@7.13.0
├─ @babel/plugin-transform-destructuring@7.13.0
├─ @babel/plugin-transform-dotall-regex@7.12.13
├─ @babel/plugin-transform-duplicate-keys@7.12.13
├─ @babel/plugin-transform-exponentiation-operator@7.12.13
├─ @babel/plugin-transform-for-of@7.13.0
├─ @babel/plugin-transform-function-name@7.12.13
├─ @babel/plugin-transform-literals@7.12.13
├─ @babel/plugin-transform-member-expression-literals@7.12.13
├─ @babel/plugin-transform-modules-amd@7.13.0
├─ @babel/plugin-transform-modules-commonjs@7.13.8
├─ @babel/plugin-transform-modules-systemjs@7.13.8
├─ @babel/plugin-transform-modules-umd@7.13.0
├─ @babel/plugin-transform-named-capturing-groups-regex@7.12.13
├─ @babel/plugin-transform-new-target@7.12.13
├─ @babel/plugin-transform-object-super@7.12.13
├─ @babel/plugin-transform-property-literals@7.12.13
├─ @babel/plugin-transform-regenerator@7.12.13
├─ @babel/plugin-transform-reserved-words@7.12.13
├─ @babel/plugin-transform-runtime@7.13.9
├─ @babel/plugin-transform-shorthand-properties@7.12.13
├─ @babel/plugin-transform-spread@7.13.0
├─ @babel/plugin-transform-sticky-regex@7.12.13
├─ @babel/plugin-transform-template-literals@7.13.0
├─ @babel/plugin-transform-typeof-symbol@7.12.13
├─ @babel/plugin-transform-unicode-escapes@7.12.13
├─ @babel/plugin-transform-unicode-regex@7.12.13
├─ @babel/preset-env@7.13.9
├─ @babel/preset-modules@0.1.4
├─ @babel/runtime@7.13.9
├─ @npmcli/move-file@1.1.2
├─ @rails/webpacker@5.2.1
├─ @types/json-schema@7.0.7
├─ @types/node@14.14.31
├─ @types/parse-json@4.0.0
├─ @types/q@1.5.4
├─ @webassemblyjs/floating-point-hex-parser@1.9.0
├─ @webassemblyjs/helper-code-frame@1.9.0
├─ @webassemblyjs/helper-fsm@1.9.0
├─ @webassemblyjs/helper-wasm-section@1.9.0
├─ @webassemblyjs/wasm-edit@1.9.0
├─ @webassemblyjs/wasm-opt@1.9.0
├─ @xtuc/ieee754@1.2.0
├─ abbrev@1.1.1
├─ acorn@6.4.2
├─ aggregate-error@3.1.0
├─ ajv-errors@1.0.1
├─ ajv-keywords@3.5.2
├─ ajv@6.12.6
├─ amdefine@1.0.1
├─ ansi-styles@3.2.1
├─ anymatch@3.1.1
├─ are-we-there-yet@1.1.5
├─ argparse@1.0.10
├─ arr-flatten@1.1.0
├─ array-find-index@1.0.2
├─ asn1.js@5.4.1
├─ asn1@0.2.4
├─ assert@1.5.0
├─ assign-symbols@1.0.0
├─ async-each@1.0.3
├─ async-foreach@0.1.3
├─ asynckit@0.4.0
├─ atob@2.1.2
├─ autoprefixer@9.8.6
├─ aws-sign2@0.7.0
├─ aws4@1.11.0
├─ babel-loader@8.2.2
├─ babel-plugin-macros@2.8.0
├─ base@0.11.2
├─ base64-js@1.5.1
├─ bcrypt-pbkdf@1.0.2
├─ binary-extensions@2.2.0
├─ bindings@1.5.0
├─ block-stream@0.0.9
├─ bluebird@3.7.2
├─ boolbase@1.0.0
├─ brace-expansion@1.1.11
├─ braces@2.3.2
├─ brorand@1.1.0
├─ browserify-aes@1.2.0
├─ browserify-cipher@1.0.1
├─ browserify-des@1.0.2
├─ browserify-rsa@4.1.0
├─ browserify-sign@4.2.1
├─ browserify-zlib@0.2.0
├─ buffer-xor@1.0.3
├─ buffer@4.9.2
├─ builtin-status-codes@3.0.0
├─ cache-base@1.0.1
├─ caller-callsite@2.0.0
├─ caller-path@2.0.0
├─ callsites@2.0.0
├─ camelcase-keys@2.1.0
├─ camelcase@5.3.1
├─ caniuse-lite@1.0.30001196
├─ case-sensitive-paths-webpack-plugin@2.4.0
├─ caseless@0.12.0
├─ chokidar@3.5.1
├─ chrome-trace-event@1.0.2
├─ class-utils@0.3.6
├─ clean-stack@2.2.0
├─ cliui@5.0.0
├─ clone-deep@4.0.1
├─ coa@2.0.2
├─ code-point-at@1.1.0
├─ collection-visit@1.0.0
├─ color-convert@1.9.3
├─ color-name@1.1.3
├─ color-string@1.5.5
├─ color@3.1.3
├─ combined-stream@1.0.8
├─ compression-webpack-plugin@4.0.1
├─ concat-map@0.0.1
├─ concat-stream@1.6.2
├─ console-browserify@1.2.0
├─ console-control-strings@1.1.0
├─ constants-browserify@1.0.0
├─ convert-source-map@1.7.0
├─ copy-concurrently@1.0.5
├─ copy-descriptor@0.1.1
├─ core-js-compat@3.9.1
├─ core-js@3.9.1
├─ core-util-is@1.0.2
├─ create-ecdh@4.0.4
├─ create-hmac@1.1.7
├─ cross-spawn@3.0.1
├─ crypto-browserify@3.12.0
├─ css-blank-pseudo@0.1.4
├─ css-color-names@0.0.4
├─ css-declaration-sorter@4.0.1
├─ css-has-pseudo@0.10.0
├─ css-loader@3.6.0
├─ css-prefers-color-scheme@3.1.1
├─ css-select-base-adapter@0.1.1
├─ css-select@2.1.0
├─ css-tree@1.0.0-alpha.37
├─ css-what@3.4.2
├─ cssdb@4.4.0
├─ cssnano-preset-default@4.0.7
├─ cssnano-util-raw-cache@4.0.1
├─ cssnano-util-same-parent@4.0.1
├─ cssnano@4.1.10
├─ csso@4.2.0
├─ currently-unhandled@0.4.1
├─ cyclist@1.0.1
├─ dashdash@1.14.1
├─ debug@4.3.1
├─ decamelize@1.2.0
├─ decode-uri-component@0.2.0
├─ delayed-stream@1.0.0
├─ delegates@1.0.0
├─ des.js@1.0.1
├─ detect-file@1.0.0
├─ diffie-hellman@5.0.3
├─ dom-serializer@0.2.2
├─ domain-browser@1.2.0
├─ domelementtype@1.3.1
├─ domutils@1.7.0
├─ dot-prop@5.3.0
├─ duplexify@3.7.1
├─ ecc-jsbn@0.1.2
├─ electron-to-chromium@1.3.681
├─ emoji-regex@7.0.3
├─ enhanced-resolve@4.5.0
├─ entities@2.2.0
├─ errno@0.1.8
├─ error-ex@1.3.2
├─ es-to-primitive@1.2.1
├─ escalade@3.1.1
├─ escape-string-regexp@1.0.5
├─ eslint-scope@4.0.3
├─ esprima@4.0.1
├─ esrecurse@4.3.0
├─ estraverse@4.3.0
├─ esutils@2.0.3
├─ events@3.3.0
├─ expand-brackets@2.1.4
├─ expand-tilde@2.0.2
├─ extend@3.0.2
├─ extglob@2.0.4
├─ extsprintf@1.3.0
├─ fast-deep-equal@3.1.3
├─ fast-json-stable-stringify@2.1.0
├─ file-loader@6.2.0
├─ file-uri-to-path@1.0.0
├─ fill-range@4.0.0
├─ findup-sync@3.0.0
├─ flatted@3.1.1
├─ flatten@1.0.3
├─ flush-write-stream@1.1.1
├─ for-in@1.0.2
├─ forever-agent@0.6.1
├─ form-data@2.3.3
├─ from2@2.3.0
├─ fs.realpath@1.0.0
├─ fsevents@2.3.2
├─ fstream@1.0.12
├─ gauge@2.7.4
├─ gaze@1.1.3
├─ gensync@1.0.0-beta.2
├─ get-caller-file@2.0.5
├─ get-intrinsic@1.1.1
├─ get-value@2.0.6
├─ getpass@0.1.7
├─ glob-parent@5.1.1
├─ glob@7.1.6
├─ global-modules@2.0.0
├─ global-prefix@3.0.0
├─ globule@1.3.2
├─ har-schema@2.0.0
├─ har-validator@5.1.5
├─ has-ansi@2.0.0
├─ has-bigints@1.0.1
├─ has-unicode@2.0.1
├─ has-value@1.0.0
├─ hash.js@1.1.7
├─ hex-color-regex@1.1.0
├─ hmac-drbg@1.0.1
├─ hosted-git-info@2.8.8
├─ hsl-regex@1.0.0
├─ hsla-regex@1.0.0
├─ html-comment-regex@1.1.2
├─ http-signature@1.2.0
├─ https-browserify@1.0.0
├─ icss-utils@4.1.1
├─ ieee754@1.2.1
├─ import-cwd@2.1.0
├─ import-fresh@2.0.0
├─ import-from@2.1.0
├─ import-local@2.0.0
├─ in-publish@2.0.1
├─ indent-string@4.0.0
├─ infer-owner@1.0.4
├─ inflight@1.0.6
├─ ini@1.3.8
├─ interpret@1.4.0
├─ is-absolute-url@2.1.0
├─ is-accessor-descriptor@1.0.0
├─ is-arrayish@0.2.1
├─ is-bigint@1.0.1
├─ is-binary-path@2.1.0
├─ is-boolean-object@1.1.0
├─ is-callable@1.2.3
├─ is-color-stop@1.1.0
├─ is-core-module@2.2.0
├─ is-data-descriptor@1.0.0
├─ is-date-object@1.0.2
├─ is-descriptor@1.0.2
├─ is-directory@0.3.1
├─ is-extglob@2.1.1
├─ is-finite@1.1.0
├─ is-glob@4.0.1
├─ is-negative-zero@2.0.1
├─ is-number-object@1.0.4
├─ is-obj@2.0.0
├─ is-plain-obj@1.1.0
├─ is-plain-object@2.0.4
├─ is-regex@1.1.2
├─ is-resolvable@1.1.0
├─ is-svg@3.0.0
├─ is-symbol@1.0.3
├─ is-typedarray@1.0.0
├─ is-utf8@0.2.1
├─ is-windows@1.0.2
├─ is-wsl@1.1.0
├─ isarray@1.0.0
├─ isexe@2.0.0
├─ isstream@0.1.2
├─ jest-worker@26.6.2
├─ js-base64@2.6.4
├─ js-tokens@4.0.0
├─ jsesc@2.5.2
├─ json-parse-better-errors@1.0.2
├─ json-parse-even-better-errors@2.3.1
├─ json-schema-traverse@0.4.1
├─ json-schema@0.2.3
├─ json-stringify-safe@5.0.1
├─ jsprim@1.4.1
├─ last-call-webpack-plugin@3.0.0
├─ lines-and-columns@1.1.6
├─ load-json-file@1.1.0
├─ loader-runner@2.4.0
├─ locate-path@3.0.0
├─ lodash.debounce@4.0.8
├─ lodash.get@4.4.2
├─ lodash.has@4.5.2
├─ lodash.memoize@4.1.2
├─ lodash.template@4.5.0
├─ lodash.templatesettings@4.2.0
├─ lodash.uniq@4.5.0
├─ lodash@4.17.21
├─ loud-rejection@1.6.0
├─ lru-cache@6.0.0
├─ make-dir@3.1.0
├─ map-obj@1.0.1
├─ map-visit@1.0.0
├─ mdn-data@2.0.4
├─ memory-fs@0.4.1
├─ meow@3.7.0
├─ merge-stream@2.0.0
├─ micromatch@3.1.10
├─ miller-rabin@4.0.1
├─ mime-db@1.46.0
├─ mime-types@2.1.29
├─ mini-css-extract-plugin@0.9.0
├─ minimatch@3.0.4
├─ minimist@1.2.5
├─ minipass-collect@1.0.2
├─ minipass-flush@1.0.5
├─ minipass-pipeline@1.2.4
├─ minizlib@2.1.2
├─ mississippi@3.0.0
├─ mixin-deep@1.3.2
├─ mkdirp@0.5.5
├─ move-concurrently@1.0.1
├─ ms@2.1.2
├─ nan@2.14.2
├─ nanomatch@1.2.13
├─ neo-async@2.6.2
├─ nice-try@1.0.5
├─ node-gyp@3.8.0
├─ node-libs-browser@2.2.1
├─ node-releases@1.1.71
├─ node-sass@4.14.1
├─ nopt@3.0.6
├─ normalize-package-data@2.5.0
├─ normalize-range@0.1.2
├─ normalize-url@1.9.1
├─ npmlog@4.1.2
├─ nth-check@1.0.2
├─ num2fraction@1.2.2
├─ number-is-nan@1.0.1
├─ oauth-sign@0.9.0
├─ object-copy@0.1.0
├─ object-inspect@1.9.0
├─ object.assign@4.1.2
├─ object.getownpropertydescriptors@2.1.2
├─ object.values@1.1.3
├─ optimize-css-assets-webpack-plugin@5.0.4
├─ os-browserify@0.3.0
├─ os-homedir@1.0.2
├─ os-tmpdir@1.0.2
├─ osenv@0.1.5
├─ p-limit@2.3.0
├─ p-locate@3.0.0
├─ p-map@4.0.0
├─ p-try@2.2.0
├─ pako@1.0.11
├─ parallel-transform@1.2.0
├─ parent-module@1.0.1
├─ parse-asn1@5.1.6
├─ parse-json@4.0.0
├─ parse-passwd@1.0.0
├─ pascalcase@0.1.1
├─ path-browserify@0.0.1
├─ path-complete-extname@1.0.0
├─ path-dirname@1.0.2
├─ path-exists@3.0.0
├─ path-is-absolute@1.0.1
├─ path-key@2.0.1
├─ path-parse@1.0.6
├─ path-type@4.0.0
├─ performance-now@2.1.0
├─ picomatch@2.2.2
├─ pinkie@2.0.4
├─ pnp-webpack-plugin@1.6.4
├─ posix-character-classes@0.1.1
├─ postcss-attribute-case-insensitive@4.0.2
├─ postcss-calc@7.0.5
├─ postcss-color-functional-notation@2.0.1
├─ postcss-color-gray@5.0.0
├─ postcss-color-hex-alpha@5.0.3
├─ postcss-color-mod-function@3.0.3
├─ postcss-color-rebeccapurple@4.0.1
├─ postcss-colormin@4.0.3
├─ postcss-convert-values@4.0.1
├─ postcss-custom-media@7.0.8
├─ postcss-custom-properties@8.0.11
├─ postcss-custom-selectors@5.1.2
├─ postcss-dir-pseudo-class@5.0.0
├─ postcss-discard-comments@4.0.2
├─ postcss-discard-duplicates@4.0.2
├─ postcss-discard-empty@4.0.1
├─ postcss-discard-overridden@4.0.1
├─ postcss-double-position-gradients@1.0.0
├─ postcss-env-function@2.0.2
├─ postcss-flexbugs-fixes@4.2.1
├─ postcss-focus-visible@4.0.0
├─ postcss-focus-within@3.0.0
├─ postcss-font-variant@4.0.1
├─ postcss-gap-properties@2.0.0
├─ postcss-image-set-function@3.0.1
├─ postcss-import@12.0.1
├─ postcss-initial@3.0.2
├─ postcss-lab-function@2.0.1
├─ postcss-load-config@2.1.2
├─ postcss-loader@3.0.0
├─ postcss-logical@3.0.0
├─ postcss-media-minmax@4.0.0
├─ postcss-merge-longhand@4.0.11
├─ postcss-merge-rules@4.0.3
├─ postcss-minify-font-values@4.0.2
├─ postcss-minify-gradients@4.0.2
├─ postcss-minify-params@4.0.2
├─ postcss-minify-selectors@4.0.2
├─ postcss-modules-extract-imports@2.0.0
├─ postcss-modules-local-by-default@3.0.3
├─ postcss-modules-scope@2.2.0
├─ postcss-modules-values@3.0.0
├─ postcss-nesting@7.0.1
├─ postcss-normalize-charset@4.0.1
├─ postcss-normalize-display-values@4.0.2
├─ postcss-normalize-positions@4.0.2
├─ postcss-normalize-repeat-style@4.0.2
├─ postcss-normalize-string@4.0.2
├─ postcss-normalize-timing-functions@4.0.2
├─ postcss-normalize-unicode@4.0.1
├─ postcss-normalize-url@4.0.1
├─ postcss-normalize-whitespace@4.0.2
├─ postcss-ordered-values@4.1.2
├─ postcss-overflow-shorthand@2.0.0
├─ postcss-page-break@2.0.0
├─ postcss-place@4.0.1
├─ postcss-preset-env@6.7.0
├─ postcss-pseudo-class-any-link@6.0.0
├─ postcss-reduce-initial@4.0.3
├─ postcss-reduce-transforms@4.0.2
├─ postcss-replace-overflow-wrap@3.0.0
├─ postcss-safe-parser@4.0.2
├─ postcss-selector-matches@4.0.0
├─ postcss-selector-not@4.0.1
├─ postcss-svgo@4.0.2
├─ postcss-unique-selectors@4.0.1
├─ prepend-http@1.0.4
├─ process-nextick-args@2.0.1
├─ process@0.11.10
├─ prr@1.0.1
├─ pseudomap@1.0.2
├─ psl@1.8.0
├─ public-encrypt@4.0.3
├─ pump@3.0.0
├─ pumpify@1.5.1
├─ punycode@2.1.1
├─ q@1.5.1
├─ qs@6.5.2
├─ query-string@4.3.4
├─ querystring-es3@0.2.1
├─ querystring@0.2.0
├─ randomfill@1.0.4
├─ read-cache@1.0.0
├─ read-pkg-up@1.0.1
├─ read-pkg@1.1.0
├─ readable-stream@2.3.7
├─ readdirp@3.5.0
├─ redent@1.0.0
├─ regenerate-unicode-properties@8.2.0
├─ regenerator-runtime@0.13.7
├─ regenerator-transform@0.14.5
├─ regexpu-core@4.7.1
├─ regjsgen@0.5.2
├─ regjsparser@0.6.7
├─ remove-trailing-separator@1.1.0
├─ repeat-element@1.1.3
├─ repeating@2.0.1
├─ request@2.88.2
├─ require-directory@2.1.1
├─ require-main-filename@2.0.0
├─ resolve-cwd@2.0.0
├─ resolve-dir@1.0.1
├─ resolve-url@0.2.1
├─ resolve@1.20.0
├─ ret@0.1.15
├─ rgb-regex@1.0.1
├─ rgba-regex@1.0.0
├─ run-queue@1.0.3
├─ sass-graph@2.2.5
├─ sass-loader@8.0.2
├─ sax@1.2.4
├─ scss-tokenizer@0.2.3
├─ semver@6.3.0
├─ set-blocking@2.0.0
├─ set-value@2.0.1
├─ setimmediate@1.0.5
├─ shallow-clone@3.0.1
├─ shebang-command@1.2.0
├─ shebang-regex@1.0.0
├─ simple-swizzle@0.2.2
├─ snapdragon-node@2.1.1
├─ snapdragon-util@3.0.1
├─ sort-keys@1.1.2
├─ source-list-map@2.0.1
├─ source-map-resolve@0.5.3
├─ source-map-support@0.5.19
├─ source-map-url@0.4.1
├─ spdx-correct@3.1.1
├─ spdx-exceptions@2.3.0
├─ split-string@3.1.0
├─ sprintf-js@1.0.3
├─ sshpk@1.16.1
├─ ssri@8.0.1
├─ stable@0.1.8
├─ static-extend@0.1.2
├─ stdout-stream@1.4.1
├─ stream-browserify@2.0.2
├─ stream-each@1.2.3
├─ stream-http@2.8.3
├─ strict-uri-encode@1.1.0
├─ string_decoder@1.3.0
├─ string.prototype.trimend@1.0.4
├─ string.prototype.trimstart@1.0.4
├─ strip-bom@2.0.0
├─ strip-indent@1.0.1
├─ style-loader@1.3.0
├─ stylehacks@4.0.3
├─ svgo@1.3.2
├─ tar@6.1.0
├─ terser-webpack-plugin@4.2.3
├─ terser@5.6.0
├─ through2@2.0.5
├─ timers-browserify@2.0.12
├─ timsort@0.3.0
├─ to-arraybuffer@1.0.1
├─ to-fast-properties@2.0.0
├─ to-object-path@0.3.0
├─ to-regex-range@2.1.1
├─ tough-cookie@2.5.0
├─ trim-newlines@1.0.0
├─ true-case-path@1.0.3
├─ ts-pnp@1.2.0
├─ tslib@1.14.1
├─ tty-browserify@0.0.0
├─ tunnel-agent@0.6.0
├─ tweetnacl@0.14.5
├─ typedarray@0.0.6
├─ unbox-primitive@1.0.0
├─ unicode-canonical-property-names-ecmascript@1.0.4
├─ unicode-match-property-ecmascript@1.0.4
├─ unicode-match-property-value-ecmascript@1.2.0
├─ unicode-property-aliases-ecmascript@1.1.0
├─ union-value@1.0.1
├─ unique-slug@2.0.2
├─ unquote@1.1.1
├─ unset-value@1.0.0
├─ upath@1.2.0
├─ uri-js@4.4.1
├─ urix@0.1.0
├─ url@0.11.0
├─ use@3.1.1
├─ util-deprecate@1.0.2
├─ util.promisify@1.0.1
├─ util@0.11.1
├─ uuid@3.4.0
├─ v8-compile-cache@2.3.0
├─ validate-npm-package-license@3.0.4
├─ vendors@1.0.4
├─ verror@1.10.0
├─ vm-browserify@1.1.2
├─ watchpack-chokidar2@2.0.1
├─ watchpack@1.7.5
├─ webpack-assets-manifest@3.1.1
├─ webpack-cli@3.3.12
├─ webpack@4.46.0
├─ which-boxed-primitive@1.0.2
├─ which-module@2.0.0
├─ which@1.3.1
├─ wide-align@1.1.3
├─ worker-farm@1.7.0
├─ wrap-ansi@5.1.0
├─ xtend@4.0.2
├─ yaml@1.10.0
├─ yargs-parser@13.1.2
└─ yocto-queue@0.1.0
✨  Done in 21.85s.
Installing dev server for live reloading
         run  yarn add --dev webpack-dev-server from "."
yarn add v1.22.10
[1/4] ?  Resolving packages...
[2/4] ?  Fetching packages...
[3/4] ?  Linking dependencies...
warning "webpack-dev-server > webpack-dev-middleware@3.7.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning " > webpack-dev-server@3.11.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[4/4] ?  Building fresh packages...
success Saved lockfile.
success Saved 102 new dependencies.
info Direct dependencies
└─ webpack-dev-server@3.11.2
info All dependencies
├─ @types/glob@7.1.3
├─ @types/minimatch@3.0.3
├─ accepts@1.3.7
├─ ansi-colors@3.2.4
├─ ansi-html@0.0.7
├─ array-flatten@1.1.1
├─ array-union@1.0.2
├─ array-uniq@1.0.3
├─ async-limiter@1.0.1
├─ async@2.6.3
├─ batch@0.6.1
├─ body-parser@1.19.0
├─ bonjour@3.5.0
├─ buffer-indexof@1.1.1
├─ compressible@2.0.18
├─ compression@1.7.4
├─ connect-history-api-fallback@1.6.0
├─ content-disposition@0.5.3
├─ cookie-signature@1.0.6
├─ cookie@0.4.0
├─ deep-equal@1.1.1
├─ default-gateway@4.2.0
├─ del@4.1.1
├─ destroy@1.0.4
├─ detect-node@2.0.4
├─ dns-equal@1.0.0
├─ dns-packet@1.3.1
├─ dns-txt@2.0.2
├─ ee-first@1.1.1
├─ eventemitter3@4.0.7
├─ eventsource@1.0.7
├─ execa@1.0.0
├─ express@4.17.1
├─ finalhandler@1.1.2
├─ follow-redirects@1.13.3
├─ forwarded@0.1.2
├─ get-stream@4.1.0
├─ globby@6.1.0
├─ handle-thing@2.0.1
├─ hpack.js@2.1.6
├─ html-entities@1.4.0
├─ http-deceiver@1.2.7
├─ http-parser-js@0.5.3
├─ http-proxy-middleware@0.19.1
├─ http-proxy@1.18.1
├─ internal-ip@4.3.0
├─ ip-regex@2.1.0
├─ ip@1.1.5
├─ ipaddr.js@1.9.1
├─ is-absolute-url@3.0.3
├─ is-arguments@1.1.0
├─ is-path-cwd@2.2.0
├─ is-path-in-cwd@2.1.0
├─ is-path-inside@2.1.0
├─ is-stream@1.1.0
├─ json3@3.3.3
├─ killable@1.0.1
├─ loglevel@1.7.1
├─ media-typer@0.3.0
├─ merge-descriptors@1.0.1
├─ methods@1.1.2
├─ mime@2.5.2
├─ multicast-dns-service-types@1.1.0
├─ multicast-dns@6.2.3
├─ negotiator@0.6.2
├─ node-forge@0.10.0
├─ npm-run-path@2.0.2
├─ object-is@1.1.5
├─ obuf@1.1.2
├─ on-headers@1.0.2
├─ opn@5.5.0
├─ original@1.0.2
├─ p-finally@1.0.0
├─ p-retry@3.0.1
├─ path-is-inside@1.0.2
├─ path-to-regexp@0.1.7
├─ portfinder@1.0.28
├─ proxy-addr@2.0.6
├─ querystringify@2.2.0
├─ raw-body@2.4.0
├─ regexp.prototype.flags@1.3.1
├─ retry@0.12.0
├─ select-hose@2.0.0
├─ selfsigned@1.10.8
├─ serve-index@1.9.1
├─ serve-static@1.14.1
├─ sockjs-client@1.5.0
├─ sockjs@0.3.21
├─ spdy-transport@3.0.0
├─ spdy@4.0.2
├─ strip-eof@1.0.0
├─ thunky@1.1.0
├─ type-is@1.6.18
├─ unpipe@1.0.0
├─ url-parse@1.5.1
├─ utils-merge@1.0.1
├─ wbuf@1.7.3
├─ webpack-dev-middleware@3.7.3
├─ webpack-dev-server@3.11.2
├─ websocket-driver@0.7.4
├─ websocket-extensions@0.1.4
└─ ws@6.2.1
✨  Done in 10.22s.
Webpacker successfully installed ? ?


9. railsサーバーの起動 (2回目)

問題なく起動。ようやく完了。。お疲れ様。

zsh
% rails s
=> Booting Puma
=> Rails 6.1.3 application starting in development 
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.2.2 (ruby 2.7.2-p137) ("Fettisdagsbulle")
*  Min threads: 5
*  Max threads: 5
*  Environment: development
*          PID: 93566
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000
Use Ctrl-C to stop
Started GET "/" for ::1 at 2021-03-06 10:44:39 +0900
   (2.7ms)  SELECT sqlite_version(*)
Processing by Rails::WelcomeController#index as HTML
  Rendering /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/templates/rails/welcome/index.html.erb
  Rendered /Users/username/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3/lib/rails/templates/rails/welcome/index.html.erb (Duration: 6.9ms | Allocations: 445)
Completed 200 OK in 33ms (Views: 20.0ms | ActiveRecord: 0.0ms | Allocations: 3882)


^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2021-03-06 10:45:03 +0900 ===
- Goodbye!
Exiting

と思いきや、DBが sqlite のまま。明日以降対応する。

  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む