0 beğenilme 0 beğenilmeme
1 görüntülenme
Ruby kategorisinde Bilge (154k puan) tarafından
rails 6 proje oluşturma
    

1 cevap

0 beğenilme 0 beğenilmeme
Bilge (154k puan) tarafından
rails new myapp
rails g controller welcome index about
inside view <p><%= Time.now %></p>



Gemfile add gem
gem 'devise'

rails generate devise:install
rails g devise:views


Rails 6 & Webpack for BOOTSTRAP
1- yarn add bootstrap@4.3.1 jquery popper.js

2- config/webpack/environment.js

const { environment } = require('@rails/webpacker');
const webpack = require('webpack');

environment.plugins.append("Provide", new webpack.ProvidePlugin({
    $: 'jquery',
    jQuery: 'jquery',
    Popper: ['popper.js', 'default']
}));

environment.config.set('resolve.alias', {jquery: 'jquery/src/jquery'});

module.exports = environment;

3- app/assets/application.js
import 'bootstrap'
import './src/application.scss'

4- create src folder in app/javascript/ and add file to src application.scss
@import '~bootstrap/scss/bootstrap';
...