I'm trying to install jschr's bootstrap-modal found here: https://github.com/jschr/bootstrap-modal to use in my rails project.
The github page's instructions indicate to:
What does this mean? I thought bootstrap was installed in rails via inclusion in the gemfile and running bundle update/install.
Vicente Reig created a Ruby Gem for you to use!
Follow his installation instructions to add the gem to your gemfile and then install the gem. This will add the files you need to your gem directory.
You need to add two require
statements:
The first in your application.js
file: The first few lines will be commented out with //
,this is where you add the .js
call.
//= require bootstrap-modal
//= require bootstrap-modalmanager
Do the same in your application.css
file:
//= require bootstrap <--(this should already be there.)
//= require bootstrap-modal
If your application.css
file doesn't have the require bootstrap
line, then it might have this:
@import "bootstrap";
if so, add this:
@import "bootstrap";
@import "bootstrap-modal";
That way, bootstrap-modal loads second.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.