-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rails7においてのbootstrapのインストールでのエラー #16
Comments
bootstrapをインストールする手順で自動的に追加された
しかし、bootstrapしか使用しないためbootstrap-iconsの行を消し、下記の状態にする
再度
|
twbs/bootstrap#39028
再度
|
|
一度 bootstrapのインストール開始
原因がnode.jsのバージョンが18以下であること、postcssがインストールされてないためと思われ、 すると
|
./bin/devコマンドを実行すると下記のエラーが発生した
Rails 7.1.1 で なので、
再度./bin/devを実施したところ、エラーが解決されブラウザ上にcssが反映された。 |
application.bootstrap.scssにて下記のコードの記載を確認。(自動で追加されてるはず)
node_modulesディレクトリ内にあるSVGスプライトファイル 上記の設定をすることでbootstrap-iconsを参照できるようになる設定は完了。 htmlのファイルにて下記のような記載をすればブラウザに反映される。
上記の |
rails7.1においてbootstrapをインストールするには、
cssbundling-rails
をインストールする必要があるようなので下記のコマンドでcssbundling-railsをインストール
下記のコマンドでbootstrap5(CSS)をインストール
Bootstrap5(JS)を導入する
CSSをビルドする(下記のエラーが発生)
The text was updated successfully, but these errors were encountered: