简体   繁体   中英

Bootstrap-Sass gem not working with Rails 4 on MacOSX

i have recently encountered an error when i run rails server after installing and following the steps mentioned in https://github.com/twbs/bootstrap-sass

What's the mising Piece??


group :assets do
    # Use SCSS for stylesheets
    gem 'sass-rails', '~> 4.0.0'

    # Use Uglifier as compressor for JavaScript assets
    gem 'uglifier', '>= 1.3.0'

    # Use CoffeeScript for .js.coffee assets and views
    gem 'coffee-rails', '~> 4.0.0'

    gem 'bootstrap-sass', '~> 3.0.3.0'
end


@import 'bootstrap'


File to import not found or unreadable: bootstrap.

I found a solution by adding this to my config.ru file

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
require 'bootstrap-sass' #require statement of bootstrap-sass
run Rails.application

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM