Giter Club home page Giter Club logo

Comments (2)

iamjillsanluis avatar iamjillsanluis commented on May 2, 2024

Hope this helps.

I too was having issues with bootstrap/custom and later bootstrap/tags but managed to explain the issue.

The cause is 4.0.0.alpha3 was released on December 14, 2015 (https://github.com/twbs/bootstrap-rubygem/releases/tag/v4.0.0.alpha3), but _custom.scss was only added on January (https://github.com/twbs/bootstrap-rubygem/commits/master/assets/stylesheets/bootstrap/_custom.scss). Similarly, you will get this error for @import 'bootstrap/tags' line since it was only added on February.

I have 3 possible short term solutions for you:

  1. In your _bootstrap-custom.scss file comment out bootstrap/custom and bootstrap/tags lines. This is ok if you don't want to override bootstrap variables and if you don't need tags yet
  2. Create the missing files in your app. So under app/assets/stylesheets create a bootstrap/_custom.scss and bootstrap/_tags.scss files. I have not tried this approach for the _tags file mainly because I don't need it yet. But it should work. The only issue I can foresee if you ever run in to one is if the _tags.scss is using variables/mixins that were not bundled in the gem release you just installed. Possible solution to it is copy the these files as you did with with the _tags.scss in your newly created bootstrap directory.
  3. The other way is, just download the https://github.com/twbs/bootstrap-rubygem/tree/master/assets and include them in your app

Long term solution is, hopefully new version can get released soon.

If you are curious about my debugging process, Rails made it really easy:

  1. It said that it couldn't find the asset in my load path:

    /moo/app/assets/config
    /moo/app/assets/images
    /moo/app/assets/javascripts
    /moo/app/assets/stylesheets
    /moo/vendor/assets/javascripts
    /moo/vendor/assets/stylesheets
    /box/gems/jquery-rails-4.1.1/vendor/assets/javascripts
    /box/gems/coffee-rails-4.2.1/lib/assets/javascripts
    /box/gems/actioncable-5.0.0/lib/assets/compiled
    /box/gems/turbolinks-source-5.0.0/lib/assets/javascripts
    /box/gems/bootstrap-4.0.0.alpha3/assets/stylesheets
    /box/gems/bootstrap-4.0.0.alpha3/assets/javascripts
    /box/gems/bootstrap-4.0.0.alpha3/assets/stylesheets
    /box/gems/bootstrap-4.0.0.alpha3/assets/stylesheets
    
  2. Since I know it is part of bootstrap, I just did ls -l /box/gems/bootstrap-4.0.0.alpha3/assets/stylesheets and later on stumbled in the stylesheets/bootstrap directory in which I did not find the missing files.

  3. Then just confirmed my suspicion that they were missed in the release by checking github.

As for your tooltip.js question, not sure as I haven't dug in to that issue 😄 .

from bootstrap-rubygem.

erunyon avatar erunyon commented on May 2, 2024

@brandonparsons Here's an example from my Rails 5 application.js. Notice the difference between the # and = for certain lines.

//= require bootstrap/util
//# require bootstrap/alert
//= require bootstrap/button
//# require bootstrap/carousel
//= require bootstrap/collapse
//= require bootstrap/dropdown
//= require bootstrap/modal
//# require bootstrap/scrollspy
//= require bootstrap/tab
//# require bootstrap/tooltip   # not required
//# require bootstrap/popover  # not required

For the SASS portions, create a _bootstrap-custom.scss file and import the individual files there.

from bootstrap-rubygem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.