Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable Sass in Rails 6?

I work in a completely air-gapped environment in which I would love to use Ruby on Rails. I have the ability to cache dependencies for offline use in Nexus. The problem I'm having is that after I've cached all my dependencies for Rails 6 (including the NodeJS ones), node-sass is unable to install because it attempts to download a file from GitHub.

I'm completely fine without using a CSS pre-processor, and would much rather deal with vanilla CSS than deal with this dependency headache. Is it possible to disable just Sass support when creating a new Rails app? I'm able to use --skip-javascript to disable all javascript support, but since all the other dependencies are able to be installed, it would be a shame to have to disable them just because node-sass can't be installed offline. Is there an option like that for Sass?

I'm aware I could manually copy the .node file from the GitHub release page, however, I'm trying to make this process as minimalistic and automatable as possible.

I'm working with Fedora Linux if that's relevant.

Any help is appreciated.

like image 928
rburmorrison Avatar asked Feb 05 '20 03:02

rburmorrison


1 Answers

Yes, I think --skip-sprockets option will disable Sass. You can also disable webpacker using --skip-javascript.

You may try below command.

rails new green-forest -S -J
like image 116
Chk Avatar answered Nov 15 '22 05:11

Chk