1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mac Rails6 アプリ作成時エラーとサーバスタート時のエラーまとめ

Posted at

目的

  • 筆者が最近Rails6の環境構築で詰まった部分をまとめる。

エラー内容

Traceback (most recent call last):
        3: from bin/rails:8:in `<main>'
        2: from bin/rails:8:in `require_relative'
        1: from /Users/admin/Documents/study/ruby_on_rails/org/aquariumPlanning/config/boot.rb:4:in `<top (required)>'
/Users/admin/Documents/study/ruby_on_rails/org/aquariumPlanning/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)

コマンド$rails serverで前述のエラーが出たら?

解決方法

  • 下記コマンドを実行
$ brew install yarn
$ bundle exec rails webpacker:install
$ rails server

コマンド$rails newで前述のエラーが出たら?

  • コマンド$ bundle exec rails new アプリ名$ rails new アプリ名などで前述のエラーが出る可能性あり。

解決方法

  • 下記コマンドを実行
$ cd アプリ名
$ brew install yarn
$ bundle exec rails webpacker:install
$ rails server
1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?