Comments (11)
This is because of the new Sass/Rails integration, in which Sass stylesheets are treated as Rails views rather than compiled separately. If you put your stylesheets in app/views (as .css.scss or .css.sass), they'll work from there.
I'll leave this issue open to remind me to print a message about this when Sass notices you have a public/stylesheets/sass
directory.
from sass.
so even is css_dir = "public/stylesheets" i should put my css.scss files to css_dir = "public/stylesheets/sass"?
from sass.
tried to put *.css.scss to app/views/stylesheets and changed compass config, but it still not works.
from sass.
Do you have routing and a controller set up for app/views/stylesheets
?
from sass.
no. should i?
from sass.
Yes, since they're just views, they need to have routes and a controller set up just like other views.
from sass.
ok. thanks it works, but as i understood it wont generate css files anymore. and i think it's bad, because it won't be possible to handle css requests without rails (only using apache or nginx).
from sass.
You can always manually include Sass::Plugin::Rack
in your middleware stack if you want to generate static CSS files. However, under most configurations, you'll still be hitting Rack/Rails somewhere in the stack.
from sass.
Compass init generates sass files in the previous place, I moved my stylesheets into app/views/stylesheets, created an stylesheets controller and setted my routes but I still get this error.
ActionView::MissingTemplate (Missing template stylesheets/screen with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :haml], :formats=>[:css], :locale=>[:"pt-BR", :"pt-BR"]} in view paths
from sass.
@maca: rather than re-opening old, tangentially related issues, please start a new issue. Also, please provide more detailed information about the steps that you're taking, the precise problem you're seeing, and how to reproduce it.
from sass.
Well I am starting a new vanilla rails app and I want to use compass and susy, I ran compass init and compass generated the sass files in app/stylesheets. From what I read in this thread having sass files in app/stylesheets is no longer the standard way and for rails integration I should create a controller for my stylesheets and store my sass files in app/views, right?
Now the problem is that apparently there is no handler for sass files so the controller doesn't know what to do with my sass templates even though they are there and are named *.css.sass.
My inmediate temporary workaround was mounting a Sinatra app and using Tilt to render the sass templates, ok, it works but gets me into other issues with compass such as this:
Sass::SyntaxError - File to import not found or unreadable: susy/susy.
Load path: .:
I joined this thread because I was having the same issue as slbug:
ActionController::RoutingError (No route matches "/stylesheets/screen.css"):
from sass.
Related Issues (20)
- Migration from @import to @use and @forward in a scss components library. Willing to pay a consultancy HOT 1
- Migration from @import to @use seems impossible with !default HOT 5
- If Sass also adopts Rust implementation for some implementations, will there be many changes. HOT 1
- How to use $each to set variables HOT 1
- Compatibility with the CSS custom function and mixin proposal HOT 6
- Allow two underscores on index files __index.scss HOT 1
- Node.js Package Importer shouldn't be strict about require.main.filename
- Sass is converting var(--c,) into var(--c) which leads to wrong code HOT 4
- Suggestion: Improve documentation around CSS Layers HOT 6
- Sass break a specific border-image syntax HOT 4
- Handle semicolons as function separators HOT 1
- Support an optional modulus argument to the round() function
- & selector in SCSS and CSS behaves differently HOT 2
- Please remove "free alestine" banner
- Please remove "free Palestine" banner HOT 2
- what is the relation between politics and css? remove that free Palestine immidiatly
- Multi asign, list deconstruction and better support for multiple returns HOT 2
- Generate deprecations list from a single source-of-truth
- Include loaded URLs in failed compilation result HOT 3
- Explicitly allow a base importer without a base URL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sass.