Questions tagged [sass-rails]

This tag is for the Ruby tools Sass precompiler used together with the Rails web framework.

19 questions
4
votes
4 answers

no implicit conversion of Sass::Importers::Filesystem into String

I am updating my Ruby on Rails application from 4.0.1 to rails version: 5.2.3 and ruby version 2.6.5. After installing bundle, server is running properly. However, When I open page in browser, I am getting following error: no implicit conversion of…
4
votes
2 answers

SASS compile with comments

I am compiling a SCSS file and it seems to remove my comments. What command can I use to keep all the comments? >SASS input.scss output.css I see two types of comments in my SCSS. // Comment and /* Comment */ What is the difference?
user2012677
  • 5,465
  • 6
  • 51
  • 113
3
votes
1 answer

Rails 6 on Heroku: `SassC::SyntaxError: Error: Undefined variable: "$body-bg"`

After upgrading from Rails 5 to Rails 6.0.3.1, my SCSS won't compile on Heroku: remote: yarn install v1.16.0 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@1.1.3: The platform…
vmarquet
  • 2,384
  • 3
  • 25
  • 39
2
votes
1 answer

Libsass: Error: "env(safe-area-inset-right)" is not a number for `max'

I am able to precompile assets in my Rails app. But when I start server and hit url. I get this error
Pandurang Waghulde
  • 995
  • 1
  • 6
  • 19
2
votes
0 answers

Gem Load Error is: uninitialized constant Sass::Rails::Tilt when starting rails server

I recently installed rails (5.0.1) to my ubuntu machine (ubuntu 16.10). I get this message whenever i try to run the server. Gem Load Error is: uninitialized constant Sass::Rails::Tilt I tried using another rails version (5.0.0.1) but the problem…
1
vote
0 answers

sassc-rails is having hard time parsing css rgb function

I have the following css class in application.css .shadow { box-shadow: 0 10px 30px 0 rgb(3 32 20/.50)!important; } When try to precompile assets the sass parser throws this error: rake aborted! remote: SassC::SyntaxError: Error: Function…
Yohann
  • 800
  • 10
  • 15
1
vote
1 answer

Less parser error while precompiling assets rails

Here is my Gemfile. source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.1.1' # Use mysql as the database for Active Record gem 'mysql2' # Use SCSS for stylesheets gem 'pg' gem…
Asnad Atta
  • 3,855
  • 1
  • 32
  • 49
1
vote
1 answer

Sass-rails issue importing css

I am trying to install a new gem (https://github.com/froala/wysiwyg-rails), it has css dependencies that I'm trying to call using sass-rails but I only see my @import instruction in the rendered css. The installation worked fine, since I did bundle…
Jean-Baptiste
  • 1,552
  • 1
  • 19
  • 33
1
vote
1 answer

Rails app using SASS importing CSS from external gems not processing Sprockets directives

I feel like this must be a relatively common issue, but my Google-foo has thus far failed me. I have a Rails 4 app where I am using SASS for my CSS. I have a couple of gems that I am (forced) to use that primarily contain CSS. Let's say gem C has…
smargh
  • 876
  • 9
  • 19
1
vote
1 answer

Why is Bundler version lookup selecting pre-release version here?

We have a gem which as development dependencies relies on sass-rails (specifically in version 5.0.4) which in turn depends on railties >4.0.0 and <5.0. Now we don't check our Gemfile.lock into the repo to keep it as flexible as possible (it's our…
CMW
  • 3,093
  • 1
  • 16
  • 20
0
votes
1 answer

Completely disabling Sprockets

I am trying to completely remove Sprockets from a Rails 6.1.3.2 with Ruby 3.0 project One of the Stackoverflow question/answers said that I need to remove the sass-rails gem from the Gemfile. Per the sass-rails gem Github repo: This gem provides…
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
0
votes
0 answers

Error: Undefined variable in sass-rails 6, but in sass-rails 5 works fine

I've a problem with sass-rails 6 on Rails 6.1.2.1. In my project styles i need to change textflow left-to-right (ltr) and right-to-left (rtl) depending on selected language. But it seems to be broken in 'sass-rails', '>= 6'. it raised: Undefined…
axcr
  • 21
  • 1
  • 2
0
votes
1 answer

Can we use scss (sass-rails) in rails css.erb view files or is this just a asset pipeline thing?

I want to know, can we use scss in rails views eg /views/home/home_stylesheet.css.scss.erb $gray-medium-light : #eaeaea; background: $gray-medium-light; I tried changing the path format <%= stylesheet_link_tag(about_me_user_path(current_user,…
Lee Eather
  • 345
  • 3
  • 16
0
votes
1 answer

Why was sass-rails gem added to my Gemfile

Rails 5.2.2 Rubymine for the Mac 2018.3.5 I generated a new application, and in my Gemfile, I see: gem 'sass-rails', '~> 5.0' I was under the impression that there's no need to include this Gem, because the Rails 5 default behavior, is to use…
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
0
votes
1 answer

Rails Sass Custom Method Not Being Ran

For some reason sass isn't running my custom function. The environment variable is defined and working as I have other ruby code that uses it within the app. I just can't figure out why SASS isn't running the function. I appreciate your help. I have…
Chris
  • 4,643
  • 6
  • 31
  • 49
1
2