×
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
1.プロジェクトの作成
rails new Proc_app
2.ディレクトリチェンジ
cd proc_app
3.btootstrap組み込み
前ブログ Node.jsのインストール(一回のみ)gemの編集
css>>cscss @import "bootstrap"
boot.rb ENV['EXECJS_RUNTIME'] = 'Node'
bundle install
4.modelの作成 Tは大文字
rails g model Task name:string discription:text
5.DBに反映
rails db:migrate
6.controller作成 小文字s付き
rails g controller tasks index new show edit
7.routesの変更
getに#
resurces :tests
root to: tests#index
rails new Proc_app
2.ディレクトリチェンジ
cd proc_app
3.btootstrap組み込み
前ブログ Node.jsのインストール(一回のみ)gemの編集
css>>cscss @import "bootstrap"
boot.rb ENV['EXECJS_RUNTIME'] = 'Node'
bundle install
4.modelの作成 Tは大文字
rails g model Task name:string discription:text
5.DBに反映
rails db:migrate
6.controller作成 小文字s付き
rails g controller tasks index new show edit
7.routesの変更
getに#
resurces :tests
root to: tests#index
PR
RubyOnRails 5.2.3にbootstrapが入らない 2019/05/21
・windwos10
・rails 5.2.3
・gem BootStrap 4.1.3
散々悩んだがこのサイトに詳しい説明がある
https://high-programmer.com/2018/11/18/windows-ruby-on-rails-bootstrap/
著者に感謝
詳細はこのアドレスを参照いただくとして、
1.Node.jsをインストール (この時点の最新版12.2.0)
2.Gemfileに追記
3.applocatio.cssの拡張子を.SCSSに変更して追記
4.boot.rbに追記
5.bundle install
でOKです、ちゃんと起動しました
ENV。。。でエラーになっていたそうです。
index.html.rebに追記
綺麗な緑のボタンが表示されればOK
・windwos10
・rails 5.2.3
・gem BootStrap 4.1.3
散々悩んだがこのサイトに詳しい説明がある
https://high-programmer.com/2018/11/18/windows-ruby-on-rails-bootstrap/
著者に感謝
詳細はこのアドレスを参照いただくとして、
1.Node.jsをインストール (この時点の最新版12.2.0)
2.Gemfileに追記
gem 'bootstrap', '~> 4.1.3'
gem 'jquery-rails'
3.applocatio.cssの拡張子を.SCSSに変更して追記
@import "bootstrap";
4.boot.rbに追記
ENV['EXECJS_RUNTIME'] = 'Node'
5.bundle install
でOKです、ちゃんと起動しました
ENV。。。でエラーになっていたそうです。
index.html.rebに追記
<%= link_to "ブートストラップのボタン",new_task_path,class:"btn btn-success" %>