guillermo haas-thompson

Joined

20 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Install Bootstrap with Webpack with Rails 6 Beta

I've been working on getting Bootstrap 4 up and running with Rails 6 Beta 3 and have a simple Popper.js I am testing, that still isn't firing. I noticed in webpack\environment.js I had another version of this different from yours. Can you explain why you have append instead of prepend

const webpack = require('webpack')
environment.plugins.prepend(
 'Provide',
 new webpack.ProvidePlugin({
   $: 'jquery',
   jQuery: 'jquery',
   jquery: 'jquery',
   'window.jQuery': 'jquery',
   Popper: ['popper.js', 'default']
 })
)
module.exports = environment

Neither solution has worked for me yet, so just wondering where I am going off the Rails so to speak.

My application.js currently has the following:

import 'bootstrap/dist/js/bootstrap.bundle'
import 'jquery/dist/jquery.slim'
import 'popper.js/dist/esm/popper'

require("@rails/ujs").start()
require("@rails/activestorage").start()

Posted in Realtime Notifications with ActionCable Discussion

I watched this last night and got tripped up because my localhost isn't the default. After some fumbling I added this to my development.rb file. config.action_cable.allowed_request_origins = ['http://localhost:1701']

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.