Giter Club home page Giter Club logo

bootstrap-rubygem's Introduction

Bootstrap Ruby Gem CI Gem

Bootstrap 5 ruby gem for Ruby on Rails (Sprockets/Importmaps) and Hanami (formerly Lotus).

For Sass versions of Bootstrap 3 and 2 see bootstrap-sass instead.

Ruby on Rails Note: Newer releases of Rails have added additional ways for assets to be processed. The twbs/bootstrap-rubygem is for use with Importmaps or Sprockets, but not Webpack.

Installation

Please see the appropriate guide for your environment of choice:

a. Ruby on Rails

Add bootstrap to your Gemfile:

gem 'bootstrap', '~> 5.3.2'

This gem requires a Sass engine, so make sure you have one of these two gems in your Gemfile:

Also ensure that sprockets-rails is at least v2.3.2.

bundle install and restart your server to make the files available through the pipeline.

Import Bootstrap styles in app/assets/stylesheets/application.scss:

// Custom bootstrap variables must be set or imported *before* bootstrap.
@import "bootstrap";

The available variables can be found here.

Make sure the file has .scss extension (or .sass for Sass syntax). If you have just generated a new Rails app, it may come with a .css file instead. If this file exists, it will be served instead of Sass, so rename it:

$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss

Then, remove all the *= require and *= require_tree statements from the Sass file. Instead, use @import to import Sass files.

Do not use *= require in Sass or your other stylesheets will not be able to access the Bootstrap mixins and variables.

Bootstrap JavaScript can optionally use jQuery. If you're using Rails 5.1+, you can add the jquery-rails gem to your Gemfile:

gem 'jquery-rails'

Bootstrap tooltips and popovers depend on popper.js for positioning. The bootstrap gem already depends on the popper_js gem.

Importmaps

You can pin either bootstrap.js or bootstrap.min.js in config/importmap.rb as well as popper.js:

pin "bootstrap", to: "bootstrap.min.js", preload: true
pin "@popperjs/core", to: "popper.js", preload: true

Whichever files you pin will need to be added to config.assets.precompile:

# config/initializers/assets.rb
Rails.application.config.assets.precompile += %w(bootstrap.min.js popper.js)

Sprockets

Add Bootstrap dependencies and Bootstrap to your application.js:

//= require jquery3
//= require popper
//= require bootstrap-sprockets

While bootstrap-sprockets provides individual Bootstrap components for ease of debugging, you may alternatively require the concatenated bootstrap for faster compilation:

//= require jquery3
//= require popper
//= require bootstrap

b. Other Ruby frameworks

If your framework uses Sprockets or Hanami, the assets will be registered with Sprockets when the gem is required, and you can use them as per the Rails section of the guide.

Otherwise you may need to register the assets manually. Refer to your framework's documentation on the subject.

Configuration

Sass: Autoprefixer

Bootstrap requires the use of Autoprefixer. Autoprefixer adds vendor prefixes to CSS rules using values from Can I Use.

If you are using bootstrap with Rails, autoprefixer is set up for you automatically. Otherwise, please consult the Autoprefixer documentation.

Sass: Individual components

By default all of Bootstrap is imported.

You can also import components explicitly. To start with a full list of modules copy _bootstrap.scss file into your assets as _bootstrap-custom.scss. Then comment out components you do not want from _bootstrap-custom. In the application Sass file, replace @import 'bootstrap' with:

@import 'bootstrap-custom';

bootstrap-rubygem's People

Contributors

adamakhtar avatar aeyoll avatar agis avatar aj-acevedo avatar alexzaytsav avatar amitport avatar andrew avatar bbenezech avatar bgentry avatar blackhawkso avatar corny avatar cvrebert avatar danielbayerlein avatar glebm avatar ixti avatar jkelleyj avatar mahnunchik avatar matteeyah avatar mishina2228 avatar mjonuschat avatar rafaelfranca avatar rmm5t avatar sbandyopadhyay avatar sporkd avatar tejasbubane avatar thomas-mcdonald avatar trisweb avatar umairsiddique avatar walgitrus avatar wndxlori avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-rubygem's Issues

File to import not found or unreadable: bootstrap/scaffolding

After migrating from BS3 I run into a page load error "File to import not found or unreadable: bootstrap/scaffolding". I have been unable to determine the cause (I have restarted the server)---although I do know it is associated with @import "bootstrap"; I suspect it is from remnants of bootstrap-sass gem (which is now gone). Not sure if this is a bug with BS4 or if it is specific to my install. Thanks for any help.

Update rake task fails

$ rake update[v4.0.0-alpha.6]
git ls-remote https://github.com/twbs/bootstrap v4.0.0-alpha.6
Updating Bootstrap
 repo   : https://github.com/twbs/bootstrap
 branch : 65ffb1c3b6e94440812a2e228cb8e8be512652ec https://github.com/twbs/bootstrap/tree/v4.0.0-alpha.6
 save to: {"js":"assets/javascripts/bootstrap","scss":"assets/stylesheets/bootstrap"}
 twbs cache: tmp/bootstrap-cache
------------------------------------------------------------
Updating scss...
  GET https://api.github.com/repos/twbs/bootstrap/git/trees/65ffb1c3b6e94440812a2e228cb8e8be512652ec?recursive=1...
  GET https://api.github.com/repos/twbs/bootstrap/git/trees/df5724cb6d7d0e8b24a6f90f0f6f25a477eb37f5?recursive=1...
  GET 82 files from https://raw.githubusercontent.com/twbs/bootstrap/65ffb1c3b6e94440812a2e228cb8e8be512652ec/scss _alert.scss _badge.scss _breadcrumb.scss _button-group.scss _buttons.scss _card.scss _carousel.scss _close.scss _code.scss _custom-forms.scss _custom.scss _dropdown.scss _forms.scss _grid.scss _images.scss _input-group.scss _jumbotron.scss _list-group.scss _media.scss _mixins.scss _modal.scss _nav.scss _navbar.scss _normalize.scss _pagination.scss _popover.scss _print.scss _progress.scss _reboot.scss _responsive-embed.scss _tables.scss _tooltip.scss _transitions.scss _type.scss _utilities.scss _variables.scss bootstrap-grid.scss bootstrap-reboot.scss bootstrap.scss mixins/_alert.scss mixins/_background-variant.scss mixins/_badge.scss mixins/_border-radius.scss mixins/_breakpoints.scss mixins/_buttons.scss mixins/_cards.scss mixins/_clearfix.scss mixins/_float.scss mixins/_forms.scss mixins/_gradients.scss mixins/_grid-framework.scss mixins/_grid.scss mixins/_hover.scss mixins/_image.scss mixins/_list-group.scss mixins/_lists.scss mixins/_nav-divider.scss mixins/_navbar-align.scss mixins/_pagination.scss mixins/_reset-text.scss mixins/_resize.scss mixins/_screen-reader.scss mixins/_size.scss mixins/_table-row.scss mixins/_text-emphasis.scss mixins/_text-hide.scss mixins/_text-truncate.scss mixins/_transforms.scss mixins/_visibility.scss utilities/_align.scss utilities/_background.scss utilities/_borders.scss utilities/_clearfix.scss utilities/_display.scss utilities/_flex.scss utilities/_float.scss utilities/_position.scss utilities/_screenreaders.scss utilities/_sizing.scss utilities/_spacing.scss utilities/_text.scss utilities/_visibility.scss...
    _alert.scss _badge.scss _breadcrumb.scss _button-group.scss _buttons.scss _card.scss _carousel.scss _close.scss _code.scss _custom-forms.scss _custom.scss _dropdown.scss _forms.scss _grid.scss _images.scss _input-group.scss _jumbotron.scss _list-group.scss _media.scss _mixins.scss _modal.scss _nav.scss _navbar.scss _normalize.scss _pagination.scss _popover.scss _print.scss _progress.scss _reboot.scss _responsive-embed.scss _tables.scss _tooltip.scss _transitions.scss _type.scss _utilities.scss _variables.scss bootstrap-grid.scss bootstrap-reboot.scss bootstrap.scss mixins/_alert.scss mixins/_background-variant.scss mixins/_badge.scss mixins/_border-radius.scss mixins/_breakpoints.scss mixins/_buttons.scss mixins/_cards.scss mixins/_clearfix.scss mixins/_float.scss mixins/_forms.scss mixins/_gradients.scss mixins/_grid-framework.scss mixins/_grid.scss mixins/_hover.scss mixins/_image.scss mixins/_list-group.scss mixins/_lists.scss mixins/_nav-divider.scss mixins/_navbar-align.scss mixins/_pagination.scss mixins/_reset-text.scss mixins/_resize.scss mixins/_screen-reader.scss mixins/_size.scss mixins/_table-row.scss mixins/_text-emphasis.scss mixins/_text-hide.scss mixins/_text-truncate.scss mixins/_transforms.scss mixins/_visibility.scss utilities/_align.scss utilities/_background.scss utilities/_borders.scss utilities/_clearfix.scss utilities/_display.scss utilities/_flex.scss utilities/_float.scss utilities/_position.scss utilities/_screenreaders.scss utilities/_sizing.scss utilities/_spacing.scss utilities/_text.scss utilities/_visibility.scss
Updating scss main files
rake aborted!
Errno::ENOENT: No such file or directory @ rb_file_s_rename - (assets/stylesheets/bootstrap/bootstrap-flex.scss, assets/stylesheets/bootstrap/../_bootstrap-flex.scss)
/Users/jcoyne/workspace/bootstrap-rubygem/tasks/updater/scss.rb:20:in `block in update_scss_assets'
/Users/jcoyne/workspace/bootstrap-rubygem/tasks/updater/scss.rb:15:in `each'
/Users/jcoyne/workspace/bootstrap-rubygem/tasks/updater/scss.rb:15:in `update_scss_assets'
/Users/jcoyne/workspace/bootstrap-rubygem/tasks/updater.rb:46:in `update_bootstrap'
/Users/jcoyne/workspace/bootstrap-rubygem/Rakefile:64:in `block in <top (required)>'
Tasks: TOP => update
(See full trace by running task with --trace)

Version bump

Can we get a version bump on this? Using in a rails engine gemspec, and I know some changes have been made since 11/2

Thanks!

Incompatible units: 'px' and 'em' - Error after upgrading gem

Hey guys,

I just changed our Gemfile to reflect the latest changes.

from

gem 'bootstrap', git: 'https://github.com/twbs/bootstrap-rubygem'

which got locked to rev 5ef4dee608c93e6b3d7538500bbac4d05c79b94b in our Gemfile.lock

to

gem 'bootstrap', '~> 4.0.0.alpha3'

After running to usual bundle install my rails-app wouldn't load anymore.

I get this error:

ActionView::Template::Error (Incompatible units: 'px' and 'em'.):

This seems to have to do with the order of our included sass-files. We have a variables.scss that changes the Bootstrap-Variables to reflect our custom theme.

We have it BEFORE bootstrap in our application.css.scss in order to have the variables set correctly.

@import 'variables';
@import 'bootstrap';

This causes the error.

When doing

@import 'bootstrap';
@import 'variables';

It does indeed work but then some colors are off in our custom-theme.

Any hints?

Alpha 5 - Update

Hi,

Alpha 5 was released yesterday, yay !

When will the gem be updated ? Really need some of the fixes... :)

Cheers,
Elie

ActionController::RoutingError (No route matches [GET] "/assets/bootstrap/<module_name>.js.map")

When the bootstrap-sprockets used in application.js file, it throws this errors for each of JS modules.

Example error message:

ActionController::RoutingError (No route matches [GET] "/assets/bootstrap/util.js.map"):
  actionpack (4.2.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.4) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.4) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.4) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
  actionpack (4.2.4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.4) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  actionpack (4.2.4) lib/action_dispatch/middleware/static.rb:116:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  rack-mini-profiler (0.9.7) lib/mini_profiler/profiler.rb:170:in `call'
  railties (4.2.4) lib/rails/engine.rb:518:in `call'
  railties (4.2.4) lib/rails/application.rb:165:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  thin (1.6.4) lib/thin/connection.rb:86:in `block in pre_process'
  thin (1.6.4) lib/thin/connection.rb:84:in `catch'
  thin (1.6.4) lib/thin/connection.rb:84:in `pre_process'
  thin (1.6.4) lib/thin/connection.rb:53:in `process'
  thin (1.6.4) lib/thin/connection.rb:39:in `receive_data'
  eventmachine (1.0.8) lib/eventmachine.rb:193:in `run_machine'
  eventmachine (1.0.8) lib/eventmachine.rb:193:in `run'
  thin (1.6.4) lib/thin/backends/base.rb:73:in `start'
  thin (1.6.4) lib/thin/server.rb:162:in `start'
  rack (1.6.4) lib/rack/handler/thin.rb:19:in `run'
  rack (1.6.4) lib/rack/server.rb:286:in `start'
  railties (4.2.4) lib/rails/commands/server.rb:80:in `start'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:80:in `block in server'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:75:in `tap'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:75:in `server'
  railties (4.2.4) lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  railties (4.2.4) lib/rails/commands.rb:17:in `<top (required)>'
  bin/rails:4:in `require'
  bin/rails:4:in `<top (required)>'
  -e:1:in `load'
  -e:1:in `<main>'

The JS seems to work and load, but those errors being throwed.

If the bootstrap used in application.js, then there is no errors in the console.

Popover: center position

I would like to use a popover but pass 'center middle' as the attachment value to Tether.

The tooltip AttachmentMap only allows 4 values. Would it be possible to pass the input value through if it is not found in the AttachmentMap? Or maybe add a center value?

I would be happy to make this change and submit a pull request, but I am unsure of contribution protocol for this project.

No border-radius on .c-select in _custom-forms.scss

@include border-radius($custom-select-border-radius);
is missing from my local version, which results in .c-select creating select elements with a border-radius of 0px, as specified by _bootstrap-reboot.scss

On a somewhat related note, _custom-forms.scss has 'custom' written out for each input type whereas my local file only uses 'c'.

Bootstrap Verison 4 -Heroku deployment - Sass::SyntaxError: File to import not found or unreadable: bootstrap-sprockets

I started using bootstrap version 4 in my rails app. And started receiving this error deploying to Heroku. my stylesheet is custom.css.scss. App works in development with not problem. Issued did not start to upgraded to bootstrap v4. When I was using the bootstrap v3 I did not have this problem with deployment ever.I have spend lot of reviewing different suggestions from other posts to no avail.

Error from heroku deployment

rake aborted!
Sass::SyntaxError:File to import not found or unreadable:bootstrap-sprockets.
remote: Load paths:
remote: /tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/app/assets/images
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/app/assets/javascripts
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/app/assets/stylesheets
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/vendor/assets/javascripts
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/vendor/assets/stylesheets

bootstrap.custom.css.scss file

@import "bootstrap";

applications.scss file

/*
*= require_tree .
*= require_self
*/

application.js file

= require jquery
= require tether
= require bootstrap-sprockets
= require jquery_ujs
= require turbolinks
= require_tree .

Gemfile

gem 'rails', '4.2.0'
gem 'pg'
gem 'sass-rails', '>= 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '
> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
Installed gems

gem 'bootstrap', '> 4.0.0.alpha3'
gem 'sass', '
> 3.4', '>= 3.4.21'
gem 'sprockets-rails', '> 3.0'
source 'https://rails-assets.org' do
gem 'rails-assets-tether', '>= 1.1.0'
end
gem 'rails_12factor', group: :production
gem 'font-awesome-rails', '
> 4.4.0.0'
gem 'pry-rails', :group => :development
gem 'autoprefixer-rails', '> 6.0.3'
gem 'devise', '
> 3.5.2'
gem 'friendly_id', '~> 5.1.0'
gem 'simple_form'

Flexbox

How do i change the display to flex from table if i install this gem? As bootstrap 4 supports flex grid

autoprefixer

I found that the autoprefixer only runs if i add gem "autoprefixer-rails" to my Gemfile too?

@import is very slow

With @import every time that i change my application.scss rails is very slow to reload the page?

Is there a method to speed up it?

Thanks

Mixins for cols omit a unit

In the file grid/_mixins.scss(Lines 25-52) the unit is omitted:

@include make-col(12) produces the following CSS code:

position: relative; min-height: 1px; padding-right: 6; padding-left: 6;
The same should apply for the margin in the make-row mixin.

Code not up to date

@i may be mistaken, but it seems that the styling included is not up to date. I just downloaded the latest styling from getbootstrap.com and it includes some navbar styling that is not included in the navbar styling in here. In here, I cannot find .navbar-default like exists in the Bootstrap code. Is this intentional or am I missing something completely? @glebm

glyphicons not working

I'm not seeing glyphicons in my app.
e.g. <span class="glyphicon glyphicon-phone" aria-hidden="true"></span>

some other bootstrap gems say I need to @import "bootstrap-sprockets" but seems that file doesn't exist?

How to enable Flexbox after using this gem ?

Hello,

I have installed this gem on one of my local project and have imported bootstrap using:

@import "bootstrap"

I guess it doesn't use the new Flexbox only with this simple configuration.
Please guide me on how to enable Flexbox Mode with this gem.

Thanks

.col-xs-12 now required on every responsive col?

Thanks for all of your work on v4! I'm enjoying working with it thus far! ๐Ÿ˜„

Sometime since the release of Alpha 3, the grid appears to have changed and now every responsive col seems to need to have .col-xs-12 in order to size correctly in XS viewports.

Correct width without col-xs-12 in alpha3:

<div class="row" style="background-color: yellow">
  <div class="col-md-6 offset-md-3" style="background-color: blue">
    <div class="card">
      <div class="card-block">
        Correct width without col-xs-12
        <br>
        dc6648900ffe8609188a7bf904bd765a492471b9
        <br>
        4.0.0.alpha3
      </div>
    </div>
  </div>
</div>

screen shot 2016-07-28 at 1 39 45 pm

Incorrect width without col-xs-12 in f6a7b7b:

<div class="row" style="background-color: yellow">
  <div class="col-md-6 offset-md-3" style="background-color: blue">
    <div class="card">
      <div class="card-block">
        Incorrect width without col-xs-12
        <br>
        f6a7b7bf41ea628b61693597be299c4257f93079
      </div>
    </div>
  </div>
</div>

screen shot 2016-07-28 at 1 38 17 pm

To correct width in f6a7b7b, we must add .col-xs-12 to every responsive col in our application:

<div class="row" style="background-color: yellow">
  <div class="col-xs-12 col-md-6 offset-md-3" style="background-color: blue">
    <div class="card">
      <div class="card-block">
        Correct width with col-xs-12
        <br>
        f6a7b7bf41ea628b61693597be299c4257f93079
      </div>
    </div>
  </div>
</div>

screen shot 2016-07-28 at 1 37 55 pm

I wanted to make sure that this change was intentional and see if anyone can explain the reasoning behind it. I think it makes for a poorer developer experience, both because of the extra typing and because of the change in behavior from what we're used to in v3. It also seems to be at odds with a mobile-first philosophy, where you don't have to do anything for XS because it is assumed to be the default.

rename @import reference

i'm attempting to override a default import of bootstrap via bootstrap-sass that's being pulled from another gem. i should be able to use this in a fork if i simply rename the @import reference and corresponding files (i was trying @import "bootstrap_4". i can't seem to get it working though. any suggestions?

Bootstrap mixin doesn't work

When I'm trying to deploy with capistrano or run rake assets:precompile I get the error

Sass::SyntaxError: Undefined mixin 'make-container'.
  (in /Users/Andrew/Sites/designvideo/app/assets/stylesheets/base/global.scss:36)

Here is the global.scss line 36

    .container-fluid {
      max-width: 95em;
      @include make-container();
        padding-left: 8%;
        padding-right: 8%;
    }

and application.scss

@import "base/variables";

@import "bootstrap";

@import "base/widgets.scss";
@import "base/global.scss";

@import "font-awesome-sprockets";
@import "font-awesome";
@import "select2";
@import "select2-bootstrap";
@import "styles/authors.scss";
@import "styles/conferences.scss";
...

Actually in development environment everything looks great. Error gets just when I'm deploying.
What could be wrong with mixins there?

Cannot load bootstrap-sprockets.js within RefineryCMS

I have a RefineryCMS 3.x application where I want to start using Bootstrap 4 alpha 5.

The Bootstrap CSS works fine but the application cannot load the bootstrap-sprockets.js or bootstrap.js file:

couldn't find file 'bootstrap-sprockets' with type 'application/javascript'
Checked in these paths:
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/speakingurl-rails-8.0.2/lib
/Users/javinto/Workspace/myproject.com/app/assets/images
/Users/javinto/Workspace/myproject.com/app/assets/javascripts
/Users/javinto/Workspace/myproject.com/app/assets/stylesheets
/Users/javinto/Workspace/myproject.com/vendor/assets/javascripts
/Users/javinto/Workspace/myproject.com/vendor/assets/stylesheets
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/underscore-rails-1.8.3/vendor/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/gmaps4rails-2.1.2/vendor/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/rails-assets-tether-1.3.7/app/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/rails-assets-tether-1.3.7/app/assets/stylesheets
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-wymeditor-1.1.0/app/assets/images
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-wymeditor-1.1.0/app/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-wymeditor-1.1.0/app/assets/stylesheets
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/jquery-ui-rails-5.0.5/app/assets/images
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/jquery-ui-rails-5.0.5/app/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/jquery-ui-rails-5.0.5/app/assets/stylesheets
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-core-3.0.4/app/assets/images
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-core-3.0.4/app/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-core-3.0.4/app/assets/stylesheets
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-core-3.0.4/vendor/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/refinerycms-i18n-3.0.1/app/assets/images
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/jquery-rails-4.2.1/vendor/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/coffee-rails-4.1.1/lib/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/turbolinks-source-5.0.0/lib/assets/javascripts
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/font-awesome-sass-4.7.0/assets/stylesheets
/Users/javinto/.rvm/gems/ruby-2.2.2@refinery3/gems/font-awesome-sass-4.7.0/assets/fonts

Copying in the bootstrap files and folder does work, but is not the preferred situation off course.

My application.js:
//= require jquery2
//= require jquery_ujs
//= require tether
//= require bootstrap-sprockets
//= require turbolinks
//= require underscore
//= require gmaps/google
//= require_tree .

I tried using Bootstrap 4 alpha 5 within another Rails 4 project and that works.

Could it have something to do with engines clashing? Overriding paths? Is this a RefineryCMS issue?

No utility classes available

None of the utility classes from the documentation are available when using this gem.

I have tried specifically @import "bootstrap/utilities";

No dice. Any ideas?

"Using a Bootstrap Template"

Hi all! Thank you for this opportunity on this awesome class!

I've finally caught up in the class but i ran into an issue on "Using a Bootstrap Template".
Localhost3000 doesn't load the new template. It only shows the site of the old class.
I verified the instructions several time and tried several things but still the new template doesn't come up.

I committed the code to github with a message explaining my problem. Is it possible anybody can help me out?

variables in _bootstrap-variables.scss template inaccurate

Just a word of caution for devs currently using this gem (as the issue should resolve itself with the next gem release) โ€“

Some SASS variable names in the most recent gem release are different than what's in the _bootstrap-variables.scss template provided in the README. Additionally, there are many new variables in _bootstrap-variables.scss that aren't in the gem.

Renamed vars include, but arent limited to:

  • $navbar-padding-horizontal (gem) > $navbar-padding-x (template)
  • $navbar-padding-vertical (gem) > $navbar-padding-y (template)
  • $breadcrumb-padding-horizontal (gem) > $breadcrumb-padding-x (template)
  • $breadcrumb-padding-vertical (gem) > $breadcrumb-padding-y (template)
  • $line-height (gem) > $line-height-base (template)
  • $label-* (gem) > $tag-* (template)

New vars include:

  • All form-related vars with the custom- prefix.
  • $tooltip-padding-y
  • $tooltip-padding-x
  • $tooltip-margin

You will need to use the older naming convention until the next gem release. New vars will be unusable until then.

For reference, this was roughly the state of the variables file at the last gem release.

Ruby on Rails setup instructions don't work for RoR 5.0.0.1 / Ruby 2.3.0

I created a fresh Rails 5 app (rails 5.0.0.1) and ran through readme instructions for rails (part a). My ruby version is 2.3.0 and I'm running off on OSX 10.12.1.

My Gemfile includes:

gem 'bootstrap', '~> 4.0.0.alpha5'

source 'https://rails-assets.org' do
    gem 'rails-assets-tether', '>= 1.1.0'
end

and despite following the steps quite carefully, I'm unable to get bootstrap styles to work. I ran through the steps twice (starting with rails new app) each time.

I see no console errors in browser, and it seems like the assets are loading. Screenshot of chrome's sources tab:
screen shot 2016-12-02 at 4 41 00 pm

I don't see any errors in the server console either. Pages that I try to throw some bootstrap stylin' onto just look broken. Below is an example of some simple markup with the expected rendered page (taken from https://getbootstrap.com/components/#navbar-text) and the actual rendered page from my machine.

Markup:

<ul class="nav nav-pills">
  <li role="presentation" class="active"><a href="#">Home</a></li>
  <li role="presentation"><a href="#">Profile</a></li>
  <li role="presentation"><a href="#">Messages</a></li>
</ul>

Expected:
screen shot 2016-12-02 at 4 46 19 pm

Actual:
screen shot 2016-12-02 at 4 46 28 pm

No webkit declarations?

Hi, I did install everything as documented for rails, but I have a problem with 'column-cards'. There is no rule such as '-webkit-column-count' and it renders only one column in Chrome, because 'column-count' is not correct in chrome.

navbar changes from single column to single row

Upgraded our local ruby users group web site, atlrug4, from bootstrap-sass (3.3.5.1) to bootstrap-rubygem.

Changed changed Gemfile file from

 gem "bootstrap-sass"

to

gem 'bootstrap', git: 'https://github.com/twbs/bootstrap-rubygem' # Version 4
source 'https://rails-assets.org' do
   gem 'rails-assets-tether', '>= 1.1.0'
end

And added 2 lines to app/assets/javascripts/application.js file:

 //= require jquery
 //= require jquery_ujs

+//= require tether
+//= require bootstrap-sprockets

 //= require bootstrap
 //= require turbolinks
 //= require_tree .

No changed to app/assets/stylesheets/application.scss file:

@import "bootstrap";
@import "variables";
@import "styles";
@import "media-queries";
@import "jobs";
@import "components/footer";
@import "components/banner";
@import "components/forms";
@import "components/navigation";

Add the navbar layout is:

      %div.navbar-collapse
        %ul.nav.navbar-nav.nav-links.navbar-left
          %li
            = link_to 'Go to Meetings', meetings_path
          %li
            = link_to 'Find Presentations', videos_path
          %li
            = link_to 'Learn Ruby', '/learn'
        %ul.nav.navbar-nav.nav-links.navbar-right
          %li
            = link_to 'Find a Job', jobs_path
          %li
            = link_to 'Hire Someone', resumes_path

Now the navbar is a single column vs. single row for bootstrap-sass (3.3.5.1).

To see the current 3.3.5.1 version at www.atlrug.com .

Any insight why for the different behavior?

Thanks...

Individual Bootstrap JS imports

Hi there,

What incantations do I need to put in my application.js file to individually import parts of the Bootstrap JS (e.g. just tooltip.js, rather than importing all).

I also seem to be having issues with loading custom SASS parts of bootstrap as well. Getting some missing references..... Is this working for everyone else?

Docs: Explain why to use Compass

I just want to use Bootsrap in Jekyll. Why I need to care about Compass? Do I really need it? Why?

May be good to explaint it in README.

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.