Wednesday, 15 June 2011

asset pipeline - Trouble installing bootstrap-sass 3.2 on a rails 4.1.0 -



asset pipeline - Trouble installing bootstrap-sass 3.2 on a rails 4.1.0 -

i trying install bootstrap-sass gem. using rubymine ide , rails 4.1.0. gem file looks like:

source 'https://rubygems.org' # bundle border rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.1.0' gem 'sprockets', '2.11.0' gem 'autoprefixer-rails' gem 'sass-rails' gem 'bootstrap-sass','3.2.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.0.0' gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 2.0' gem 'haml' gem 'sdoc', '~> 0.4.0', group: :doc grouping :development gem 'spring' gem 'sqlite3' gem 'byebug', '3.4.0' gem 'web-console', '2.0.0.beta3' end grouping :production gem 'pg', '0.17.1' gem 'rails_12factor', '0.0.2' end

i getting error missing file reference when adding next lines application.css.scss file:

@import "bootstrap"; @import "bootstrap-sprockets";

if alter before version of bootstrap-sass 2.3.2, can first import statement (@import "bootstrap") work, sec still fails. likewise application.js file line //= require bootstrap-sprockets throws error file not found. application.css.scss is:

/* * manifest file that'll compiled application.css, include files * listed below. * * css , scss file within directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can referenced here using relative path. * * you're free add together application-wide styles file , they'll appear @ bottom of * compiled file styles add together here take precedence on styles defined in styles * defined in other css/scss files in directory. improve create new * file per style scope. * *= require_tree . *= require_self */ @import "bootstrap"; @import "bootstrap-sprockets";

i have same errors on rubymine app works fine , no errors thrown @ runtime. rubymine bug

update 1:

i had quick gem source code. uses custom asset_path settings rather defaults. rubymine can't observe main asset file are

update 2: sprockets comes before bootstrap, see github readme , require_self should before require_tree (as first want load bootsrap css files , other css files)

/* *= require_self *= require_tree . */ @import "bootstrap-sprockets"; @import "bootstrap";

ruby-on-rails-4 asset-pipeline rubymine bootstrap-sass

No comments:

Post a Comment