camelmasa / animate-rails

animate.css for rails.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

animate-rails is not working on heroku

charith08 opened this issue · comments

commented

animate-rails is not working on heroku, but working on local. Coffeescript is working on heroku production though.

rails version: Rails 6.1.4.1
ruby version: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]

Below is the code in the respective files:

Gemfile
gem "animate-rails"

application.css.scss
*= require animate

application.js
import 'animate.css/animate'

package.json
"animate.css": "^4.1.1"

production.rb
config.assets.compile = false

html file
.nav-item.animate__animated.fadeIn.animate__slower.animate__delay-2s Sample Text

application.html.slim

    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
    = javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'

environment.js

const { environment } = require('@rails/webpacker')
const coffee = require('./loaders/coffee')
const webpack = require('webpack')
environment.plugins.append('Provide',
  new webpack.ProvidePlugin({
    $: 'jquery',
    jQuery: 'jquery',
    Popper: ['popper.js', 'default']
  })
)
environment.loaders.prepend('coffee', coffee)
module.exports = environment