0
0

More than 1 year has passed since last update.

rails sがうまくいかなかった

Posted at

背景
railsのバージョンを6.1.6.1 → 6.1.4.4に変更。
変更前はエラーが多発していた
1.
Running via Spring preloader in process ~
2.
gemでgemfile.lockにインストールされていない
3.
rails s
rails db:migrate
rails db:seed

バージョンによる問題、バージョンが理由ではない問題に
切り離して考えてみた。

問題が起こる前の挙動
gemfile
gem 'activeadmin'
gem 'devise'
gem 'net-smtp'
を追加して、
bundle install —path vendor/bundle

実行
❯ rails s

=> Booting Puma
=> Rails 6.1.6.1 application starting in development
=> Run bin/rails server --help for more startup options
Exiting
/Users/~/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/webpacker-5.4.3/lib/webpacker/configuration.rb:103:in `rescue in load': Webpacker configuration file not found /Users/~/active_admin_sample/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/~/Desktop/program/active_admin_sample/config/webpacker.yml (RuntimeError)
がかえってくる。

エラー内容の特定:
どこ)configuration.rb:103:in `rescue in load': Webpacker configuration file not found
何)Please run rails webpacker

よって、
以下を実行
rails webpacker:install
bundle install
yarn install

実行結果、なんとか無事にパス
yarn installの意味もパッケージ関係としておさえておきます

0
0
1

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