GithubHelp home page GithubHelp logo

Comments (15)

glebm avatar glebm commented on April 28, 2024 1

Remove .scss from @import (extensions are picked up automatically)

from bootstrap-sass.

jamesarosen avatar jamesarosen commented on April 28, 2024

I get the same error regardless of where I have the @import statement. I've also tried everything in #69 to no avail.

Things that don't work:

  • @import "bootstrap" in vendor.scss
  • @import "bootstrap" in vendor.css.scss
  • @import "bootstrap.scss" in vendor.css.scss
  • @import "bootstrap" in twitter-bootstrap.scss with @import "twitter-bootstrap" in vendor.css.scss
  • countless other similar variations

from bootstrap-sass.

jamesarosen avatar jamesarosen commented on April 28, 2024

Whoops. My problem was that I had bootstrap-sass as a gem dependency of another engine. Rails apparently doesn't look "through" one engine to another when autoloading. Adding require "bootstrap-sass" to my own engine fixed the problem.

from bootstrap-sass.

cdredfox avatar cdredfox commented on April 28, 2024

in cloudfoundry.org deploy still this issue

from bootstrap-sass.

volkanunsal avatar volkanunsal commented on April 28, 2024

I solved this by putting an underscore in front of the filename, i.e.

@import "_bootstrap";

from bootstrap-sass.

timuckun avatar timuckun commented on April 28, 2024

import "bootstrap";

I am running into the same problem and using the underscore doesn't help either.

Sass::SyntaxError: File to import not found or unreadable: bootstrap.
Load path: Sass::Rails::Importer(/Users/tim/Documents/digital_dialogue/source/chrysler/app/assets/stylesheets/bootstrap_and_overrides.css.scss)
(in /Users/tim/Documents/digital_dialogue/source/chrysler/app/assets/stylesheets/bootstrap_and_overrides.css.scss)

from bootstrap-sass.

alenteria avatar alenteria commented on April 28, 2024

same problem here

Is this problem still not solved?

from bootstrap-sass.

Chucheen avatar Chucheen commented on April 28, 2024

I have the same problem. I'm using rails 3.2.15.
But, it's not only with bootstrap, it happens also for any file with extension scss. If i change extension to css it solves the file right away, but obviously doesn't convert to css.

Thanks in advance

from bootstrap-sass.

glebm avatar glebm commented on April 28, 2024

you can try running "bundle update --source sass-rails"

from bootstrap-sass.

Chucheen avatar Chucheen commented on April 28, 2024

thanks @glebm but it didn't work. I't started to happen when i change the rails version from 3.2.3 to 3.2.15 because Bootstrap-dropdown didn't work. After having changed it, it worked again, but trying to push to Heroku throws error: "File to import not found or unreadable: custom.scss". The same error is thrown if i run "bundle exec rake assets:precompile".
Is there some config that changed from version 3.2.3 that i'm missing somewhere?

from bootstrap-sass.

glebm avatar glebm commented on April 28, 2024

Looks like you are @import'ing custom somewhere in your code. The file doesn't exist.

from bootstrap-sass.

Chucheen avatar Chucheen commented on April 28, 2024

of course im importing it in my application.css file.

I've have posted a more detailed explanation of my problem here: http://stackoverflow.com/questions/19775301/file-to-import-not-found-or-unreadable-only-with-scss-files

check it out and i'd be very grateful if you point on which way to go or how can i solve it...

Thanks

from bootstrap-sass.

glebm avatar glebm commented on April 28, 2024

Rename application.css to application.scss

from bootstrap-sass.

Chucheen avatar Chucheen commented on April 28, 2024

Thank you very much @glebm !!!

I renamed the file to .scss and it worked like a charm. Why is this? in version 3.2.3 it worked with css extension.

I have another doubt, not critical, do you know why after a rake assets:precompile the folder in public/assets doesn't include bootstrap folder and it did before? If i run rails s dropdown isn't working, but if i push to heroku it does there.
If i remove that folder, dropdown works again in development evironment.

maybe is some configuration missing in development environment for precompiling?

Thanks again for the above solution.

from bootstrap-sass.

glebm avatar glebm commented on April 28, 2024

It's because a .css file is not processed by Sass, so @import will not work, see also: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#import.

You should not be precompiling assets in development environment, nor checking in precompiled assets into source control. http://guides.rubyonrails.org/asset_pipeline.html

from bootstrap-sass.

Related Issues (20)

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.