dungbanguyen/adminlte-rails

How to use this if I am already using bootstrap-sass separately?

Closed this issue · 6 comments

Using Rails 4. I have been using https://github.com/twbs/bootstrap-sass, and now want to integrate Admin LTE for a different dashboard, but would not want to modify my existing code for Bootstrap. I notice that this gem includes Bootstrap in itself by default.

How can I integrate this Admin LTE cleanly into my existing app?

@victorngkp You could use tag v2.3.2 for Admin LTE latest version and do not require bootstrap in your manifest files, just require what you need: adminlte, plugins...

Just to confirm, my existing setup:

gem 'bootstrap-sass', '~> 3.3.6'
gem 'sass-rails', '>= 3.2'

@import "bootstrap-sprockets";
@import "bootstrap";
# the rest of other custom imports

//= require jquery
//= require bootstrap-sprockets

So with the branch v2.3.2 of adminlte-rails, I don't have to remove my current setup, but require things that I need from adminlte-rails only?

Also, it looks like your v2.3.2 is same as Master. Actually I tried your Master branch, but it is not working as expected. The layout and everything is off. I will send you a screenshot few hours later (am working now).

v2.3.3 is same as master branch but I have not released new version of this gem yet. Updating README is still in progress. You could try this

gem 'adminlte-rails', git: 'https://github.com/shine60vn/adminlte-rails'
//= require bootstrap
//= require adminlte/adminlte
@import "bootstrap-sprockets";
@import "bootstrap.min.css";
@import "adminlte/adminlte.css";
@import "adminlte/skins/_all-skins.css";
@import "adminlte/plugins/iCheck/flat/blue.css";

Works like charm. I also installed Font Awesome from here - https://github.com/bokmann/font-awesome-rails

My full code:

# Gemfile
gem "adminlte-rails", git: "https://github.com/shine60vn/adminlte-rails"
gem "bootstrap-sass", "~> 3.3.6"
gem "font-awesome-rails"
# application.scss
@import "bootstrap-sprockets";
@import "bootstrap";
@import "ie10-viewport-bug-workaround";
@import "font-awesome";
@import "adminlte/adminlte.css";
@import "adminlte/skins/_all-skins.css";
@import "adminlte/plugins/iCheck/flat/blue.css";
# application.js
//= require jquery
//= require bootstrap-sprockets
//= require adminlte/adminlte
//= require jquery_ujs
//= require turbolinks
//= require_tree .

cool! 👍