sassc | libsass command line driver
kandi X-RAY | sassc Summary
kandi X-RAY | sassc Summary
libsass command line driver
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sassc
sassc Key Features
sassc Examples and Code Snippets
Community Discussions
Trending Discussions on sassc
QUESTION
I am getting the following error zeitwerk/loader/helpers.rb:95:in const_get': uninitialized constant Controllers::BasePublicDecorator (NameError)
This is an error in a local production console using rails c -e production
but not an issue in development which works perfectly.
In an engine, CcsCms::PublicTheme
, I have a decorator I am using to extend the controller of another CcsCms::Core
engine and it is this decorator that is causing the error.
...public_theme/app/decorators/decorators/controllers/base_public_decorator.rb
ANSWER
Answered 2022-Apr-02 at 19:30Problem here is that when lazy loading, nobody is referencing a constant called ...::BasePublicDecorator
. However, Zeitwerk expects that constant to be defined in that file, and the mismatch is found when eager loading.
The solution is to configure the autoloader to ignore the decorators, because you are handling their loading, and because they do not define constants after their names. This documentation has an example. It needs to be adapted to your engine, but you'll see the idea.
For completeness, let me also explain that in Zeitwerk, eager loading is a recursive const_get
, not a recursive require
. This is to guarantee that if you access the constant, loading succeeds or fails consistently in both modes (and it is also a tad more efficient). Recursive const_get
still issues require
calls via Module#autoload
, and if you ran one for some file idempotence also applies, but Zeitwerk detects the expected constant is not defined anyway, which is an error condition.
QUESTION
So I have a file not found problem. I have an engine that works in development mode in the engines test/dummy app, the engine allows the editing of sass variables and stores them in a theme table, the variables are used by a sass partial such as _banner.scss containing variables used in the main stylesheet such as $banner_color which is then imported into the main stylesheet which in turn is precompiled using an initializer in the engine.rb file and inclusion in the app/config/engine_name_manifest.js.
The files are all available in development with the local dummy app but not in the eventual host app due to the assets being compiled.
I have a rake task that takes the data, updates the relevant partial e.g. _banner.scss with the data from the theme table but of course the partials are not not available in a host app as the engine has already compiled them. I'm looking for a solution that will allow me to edit the raw, uncompiled stylesheets then recompile them. Obviously my Capistrano deploy script will need to reapply the stylesheet changes every deployment but that is just a rake task call. What approach should I take? Should I find a way to copy the css files to the host app in an engine initializer? Should I use a different approach entirely, I have started looking at propshaft but that is a massive step to replace sass rails and I'm not sure how that would help
The engine
...ANSWER
Answered 2022-Apr-02 at 03:44Thanks for clarifying. If I understood correctly here my take on it.
partials are not not available in a host app as the engine has already compiled them
Partials are still there, precompilation just outputs *.{css/js}
files into public/assets/
that are declared in app/assets/config/manifest.js
.
To get to engines files, instead of Rails.root
use:
QUESTION
I upgraded to macOS 12.3 recently and that broke my jekyll website. When I first tried to build my website after the upgrade, my computer (Macbook Air with Intel chip) would crash.
So far, I have upgraded homebrew and addressed all warnings:
...ANSWER
Answered 2022-Mar-28 at 21:48I was able to get the site to build by hiding the content related to "research/works" (a collection) and that felt like an incomplete answer.
I think that my answer is more complete now: it seems that subdirectories now cause problems within collections (at least the ones with output). I removed the subdirectory so that all items in my _works collection are directly contained in the _works directory and my site is now building as it once was.
QUESTION
I have a Rails 7 project using TailwindCSS deployed to Heroku that is not building tailwind.css
during rake asset:precompile
and I don't know why. When I try to access the application, it crashes with this error:
ANSWER
Answered 2022-Mar-23 at 15:15Try running the following commands on your local machine:
QUESTION
I recently upgraded from Rails 6.1.4.6 to 7.0.2.2. With this upgrade I switched from webpacker to import maps with sprockets. My repo didn't include turbolinks or stimulus and I didn't feel like adding them now either. So I re-added UJS and most of my tests pass except the action cable feature tests. It seems I cannot get action cable to connect.
Any help would be appreciated!
Gemfile
...ANSWER
Answered 2022-Mar-09 at 22:08Figured out the problem was because I had two applications.js
files. One in app/assets/javascripts/
and another in app/javascript
. Sprockets was serving my asset version of application.js due to my manifest pointing there. I adjusted the manifest and deleted the secondary application.js and all is working.
QUESTION
I gen this error when I try to deploy:
...ANSWER
Answered 2022-Mar-05 at 11:54Tailwind CSS for Rails is not compatible with SassC::Rails:
Tailwind uses modern CSS features that are not recognized by the
sassc-rails
extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors likeSassC::SyntaxError
, you must remove that gem from your Gemfile.
Remove sassc-rails
from your Gemfile
, run bundle
, commit the changes, and redeploy.
QUESTION
I'm working on getting a new Rails 7 project deployed to production (trying on both Heroku and Render.com) and am getting the following error during build:
...ANSWER
Answered 2021-Dec-18 at 05:58From rails tailwind readme
Tailwind uses modern CSS features that are not recognized by the sassc-rails extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors like SassC::SyntaxError, you must remove that gem from your Gemfile.
QUESTION
I'm very new to Rails and full-stack development in general. I've just finished Michael Hartl's Ruby on Rails Tutorial 6th edition and am walking through it again to build my first project (i.e. an app that's different from the sample app built in the book, but draws on a lot of the same lessons). Catch is that new project is using Rails 7.
It was going well until I ran into issues around Chapter 7; my app will not render a partial with error messages for bad submissions to the new user form. The code in the partial executes (as verified with debugger, and later with a puts statement to output on console), but the HTML doesn't output (i.e. it cannot be found when inspecting the page in Chrome). There is a CSS issue related to newer version of bootstrap, but I even tried downgrading to the bootstrap version from the book (3.4.1) with no luck. (the offending CSS segment is commented out below)
I've banged my head on this for a few hours. Hoping it's just something dumb I'm missing. If it's a broader issue with Bootstrap vs Importmaps or something I'd also appreciate references on good places to learn these. I am extremely grateful for any ideas!
Edit This definitely isn't an issue with passing local variables into the partial; see code snippet and comment added at the end of this post.
app/views/users/new.html.erb:
...ANSWER
Answered 2022-Feb-14 at 02:28Try this in app/views/users/new.html.erb
<%= render 'shared/error_messages', user: @user %>
If it's a shared partial, maybe make the instance variable generic rather than @user
also. That way it can be reused and less confusing later.
QUESTION
I am learning Hotwire-rails, following both the gorails.com and the Hotwire.dev examples. I am running Ruby 3.0.2 and Rails 6.1.4.1. The symptom is at the very start. After rails new xxx, I edit Gemfile to add gem 'hotwire-rails', then bundle install. At this point my app/javascript/packs/application.js is now:
...ANSWER
Answered 2021-Nov-11 at 12:27This seems like everything is working correctly rails just likes to output what its doing to the console but it should have added those to your file.
QUESTION
here's how my Dockerfile look like :
...ANSWER
Answered 2022-Feb-02 at 18:12Replacing CMD with RUN as shown below will solve your issue.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sassc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page