Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

war file does not have extensions for sassc #509

Open
jlahtinen opened this issue Feb 17, 2022 · 0 comments
Open

war file does not have extensions for sassc #509

jlahtinen opened this issue Feb 17, 2022 · 0 comments

Comments

@jlahtinen
Copy link

I am using rvm 1.29.12-next (master)
jruby version is clean and installed with rvm install 9.2.20.1
updated latest rubygems. workaround here rvm/rvm#5182
rails project is new created by rails new minimal --minimal version is 6.1.1
added warbler to Gemfile bundle add warbler version is 2.0.5
warbled a war budle exec warble
created war does not open in tomcat org.jruby.exceptions.StandardError: (GemNotFound) Could not find sassc-2.4.0 in any of the sources

lets examine created war
make temp folder mkdir war_temp; mv minimal.war war_temp; cd !$; unzip minimal.war

and now test with bundle check. Environment variables are copied from META-INF/init.rb

$ GEM_HOME=./WEB-INF/gems GEM_PATH= BUNDLE_GEMFILE=./WEB-INF/Gemfile BUNDLE_WITHOUT=development bundle check
Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0
The following gems are missing
 * sassc (2.4.0)

what if used GEM_HOME= GEM_PATH=/home/jlahtinen/.rvm/gems/jruby-9.2.20.1 bundle check in rails project =>
The Gemfile's dependencies are satisfied

what is different between war's gems folder and .rvm's gems folder is that war's gems folder does not contain extensions folder. Let's copy that inside war's gems folder rsync -a /home/jlahtinen/.rvm/gems/jruby-9.2.20.1/extensions war_temp/WEB-INF/gems/. and check again.

cd war_temp; GEM_HOME=./WEB-INF/gems GEM_PATH= BUNDLE_GEMFILE=./WEB-INF/Gemfile BUNDLE_WITHOUT=development bundle check => The Gemfile's dependencies are satisfied

extenions folder contains

WEB-INF/gems/extensions/
`-- universal-java-1.8
     `-- 2.5.0
        |-- executable-hooks-1.6.1
        |   |-- gem.build_complete
        |   `-- gem_make.out
        |-- gem-wrappers-1.4.0
        |   |-- gem.build_complete
        |   `-- gem_make.out
        `-- sassc-2.4.0
            |-- gem.build_complete
            |-- gem_make.out
            `-- sassc
                `-- libsass.so

Should

  1. warbler add extensions folder into war?
  2. warbler otherway tell that extensions are ok and not needed?
  3. rvm be fixed?
  4. rubygems be fixed?
  5. other?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant