Coder Social home page Coder Social logo

Comments (10)

ntkme avatar ntkme commented on June 9, 2024 1

Dart Sass 1.55.0 (sass/dart-sass#1806) will be released soon, and I will cut a matching release once 1.55.0 is out.

from sass-embedded-host-ruby.

ntkme avatar ntkme commented on June 9, 2024

Have you tried the pre-built ones which does not require vbscript for unzipping? E.g.
1.54.9 - September 08, 2022 x64-mingw-ucrt (3.04 MB)
1.54.9 - September 08, 2022 x64-mingw32 (3.04 MB)
1.54.9 - September 08, 2022 x86-mingw32 (14.2 MB)

from sass-embedded-host-ruby.

ntkme avatar ntkme commented on June 9, 2024

I guess you're on JRuby? I can put back the powershell version.

from sass-embedded-host-ruby.

chadlwilson avatar chadlwilson commented on June 9, 2024

Yeah, on JRuby. I don't follow all the way this works but I understand all the challenges with platform detection (the same ones that cause me issues with sassc and libsass trying to compile on Windows) causes it to "build the native extension" i.e download and unzip in this case.

from sass-embedded-host-ruby.

ntkme avatar ntkme commented on June 9, 2024

@chadlwilson I don't have access to windows. If possible can you please see if the main branch works?

gem 'sass-embedded', github: 'ntkme/sass-embedded-host-ruby'

from sass-embedded-host-ruby.

chadlwilson avatar chadlwilson commented on June 9, 2024

Thanks! 🙏 Switched in gocd/gocd#10796

4724a84 seems to be working fine on both Windows 2019 Server Core and Windows 11 (with appropriate Set-ExecutionPolicy, one of these annoying Powershell things, I guess 🤔).

Windows 11

Fetching https://github.com/ntkme/sass-embedded-host-ruby.git
Using sass-embedded 1.54.9 from https://github.com/ntkme/sass-embedded-host-ruby.git (at main@4724a84)

gem_make.out via JRuby

current directory: C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/bundler/gems/sass-embedded-host-ruby-4724a844b7cd/ext/sass
C:/gocd/server/scripts/jruby.bat -Iuri:classloader:/META-INF/jruby.home/lib/ruby/stdlib -rrubygems C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/bundler/gems/extensions/universal-java-17/2.6.0/sass-embedded-host-ruby-4724a844b7cd RUBYLIBDIR\=C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/bundler/gems/extensions/universal-java-17/2.6.0/sass-embedded-host-ruby-4724a844b7cd
fetch https://github.com/sass/dart-sass-embedded/releases/download/1.54.9/sass_embedded-1.54.9-windows-x64.zip
powershell -NoLogo -NoProfile -NonInteractive -File unzip.ps1 -Archive sass_embedded-1.54.9-windows-x64.zip -DestinationPath .
rm sass_embedded-1.54.9-windows-x64.zip
fetch https://github.com/sass/embedded-protocol/raw/1.1.0/embedded_sass.proto
fetch https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.21.5/protoc-3.21.5-windows-x86_64.exe
chmod a+x protoc.exe
./protoc.exe --proto_path=. --ruby_out=. embedded_sass.proto

Windows 2019 Server Core

Fetching https://github.com/ntkme/sass-embedded-host-ruby.git
Using sass-embedded 1.54.9 from https://github.com/ntkme/sass-embedded-host-ruby.git (at main@4724a84)

from sass-embedded-host-ruby.

ntkme avatar ntkme commented on June 9, 2024

I just pushed a Java based unzip solution. It should work better for JRuby on Windows as neither powershell nor vbscript is required.

from sass-embedded-host-ruby.

chadlwilson avatar chadlwilson commented on June 9, 2024

OK, I can give it a go tomorrow 🙏

from sass-embedded-host-ruby.

chadlwilson avatar chadlwilson commented on June 9, 2024

Working fine on Windows 11.

current directory: C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/bundler/gems/sass-embedded-host-ruby-0d103fd1936a/ext/sass
C:/gocd/server/scripts/jruby.bat -Iuri:classloader:/META-INF/jruby.home/lib/ruby/stdlib -rrubygems C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/bundler/gems/extensions/universal-java-17/2.6.0/sass-embedded-host-ruby-0d103fd1936a RUBYLIBDIR\=C:/gocd/server/src/main/webapp/WEB-INF/rails/gems/jruby/2.6.0/bundler/gems/extensions/universal-java-17/2.6.0/sass-embedded-host-ruby-0d103fd1936a
fetch https://github.com/sass/dart-sass-embedded/releases/download/1.54.9/sass_embedded-1.54.9-windows-x64.zip
Archive:  sass_embedded-1.54.9-windows-x64.zip
  inflating: sass_embedded/src/LICENSE
  inflating: sass_embedded/src/dart.exe
  inflating: sass_embedded/src/dart-sass-embedded.snapshot
  inflating: sass_embedded/dart-sass-embedded.bat
rm sass_embedded-1.54.9-windows-x64.zip
fetch https://github.com/sass/embedded-protocol/raw/1.1.0/embedded_sass.proto
fetch https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.21.5/protoc-3.21.5-windows-x86_64.exe
chmod a+x protoc.exe
./protoc.exe --proto_path=. --ruby_out=. embedded_sass.proto

And on Windows 2019 Server Core (don't have easy access to gem_make.out here)

> Task :server:initializeRailsGems
Using environment variables
CLASSPATH='C:\Users\ContainerAdministrator\.gradle\caches\modules-2\files-2.1\org.jruby\jruby-complete\9.3.7.0\92b318807fd957ace836078a1df5810e5471f42\jruby-complete-9.3.7.0.jar' \
 GEM_HOME='C:\go\pipelines\build-windows\server\src\main\webapp\WEB-INF\rails\gems\jruby\2.6.0' \
 GEM_PATH='C:\go\pipelines\build-windows\server\src\main\webapp\WEB-INF\rails\gems\jruby\2.6.0' \
     PATH='C:\go\pipelines\build-windows\server\scripts;C:\go\pipelines\build-windows\server\src\main\webapp\WEB-INF\rails\gems\jruby\2.6.0\bin;C:\tools\ruby31\bin;C:\Program Files\Eclipse Adoptium\jdk-17.0.4.101-hotspot\bin;C:\Python310\Scripts\;C:\Python310\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\nant-0.92\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files (x86)\Subversion\bin;C:\Program Files\Git\cmd;C:\Program Files\Perforce\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\\Perforce\\bin;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps;C:\Users\ContainerAdministrator\AppData\Roaming\npm;C:\Program Files\Mercurial\;C:\Users\ContainerAdministrator\AppData\Local\Yarn\bin' \
     RUBY='C:/go/pipelines/build-windows/server/scripts/jruby.bat' \
[C:\go\pipelines\build-windows\server\src\main\webapp\WEB-INF\rails]$ java -Djruby.home=uri:classloader://META-INF/jruby.home -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xss2048k -client --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED -Xmx1g -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\ContainerAdministrator\.gradle\caches\modules-2\files-2.1\org.jruby\jruby-complete\9.3.7.0\92b318807fd957ace836078a1df5810e5471f42\jruby-complete-9.3.7.0.jar org.jruby.Main org.jruby.Main -S bundle install

# ... snip

Fetching https://github.com/sass/sassc-ruby.git
Fetching https://github.com/ntkme/sass-embedded-host-ruby.git
Using sassc 2.4.0 from https://github.com/sass/sassc-ruby.git (at refs/pull/233/head@244d3dc)
Using sass-embedded 1.54.9 from https://github.com/ntkme/sass-embedded-host-ruby.git (at main@0d103fd)
Fetching sassc-embedded 1.54.0
Installing sassc-embedded 1.54.0
Fetching sassc-rails 2.1.2
Installing sassc-rails 2.1.2

# ... snip

Bundle complete! 14 Gemfile dependencies, 72 gems now installed.
Bundled gems are installed into `./gems`

And then works fine after that with the assets pipeline :-)

from sass-embedded-host-ruby.

chadlwilson avatar chadlwilson commented on June 9, 2024

Hello @ntkme - are you planning to publish a 1.59 patch release with these enhancements soon? It would be useful so I can switch back to proper rubygems releases rather than using main in order to have things working on Windows.

from sass-embedded-host-ruby.

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.