k0kubun / hamlit

High Performance Haml Implementation
https://rubygems.org/gems/hamlit
Other
981 stars 59 forks source link

Gem fails to install under JRUBY 9.1.8.0 #100

Closed rebelwarrior closed 6 years ago

rebelwarrior commented 7 years ago

Can't install gem under JRuby probably missing native extensions. 😢

k0kubun commented 7 years ago

😭

We can have the same Ruby code for C ext part but I am reluctant to do that. And I don't know better solution for this yet. How do you JRuby guys solve such problems usually?

rebelwarrior commented 7 years ago

Usually we and by we I mean they, would code it in Java.

I don't speak Java but I'll see if some of my co-workers will help me if you're willing to guide me on what to do. :-)

Sent from my mobile.

On Mar 24, 2017, at 7:14 PM, Takashi Kokubun notifications@github.com wrote:

😭

We can having Ruby code for C ext part but I am reluctant to do that. And I don't know better solution for this yet. How do you JRuby guys solve such problems usually?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

knightq commented 7 years ago

No chance to be solved or workarounded?

k0kubun commented 7 years ago

I started to implement this. That'll be solved shortly. There's no direct workaround but you can use Haml 5 for now.

sudoremo commented 6 years ago

Is there any progress on this? Hamlit would be a tremendous advantage for our jRuby projects :)

k0kubun commented 6 years ago

Haha, I've just noticed I started to work on that a year and a half ago and it's still not done now... :)

I'll take a look at this again today.

sudoremo commented 6 years ago

@k0kubun That would be amazing, thank you. Let me know if I can be of any assistance.

k0kubun commented 6 years ago

Initially I was planning to implement all with Java extension, but I changed my plan to implement all with Ruby first and then migrate it to Java extension one by one. Even so, this should be already faster than Haml gem.

Anyway, this issue should be ready to be closed. Please try Hamlit v2.9.1.

sudoremo commented 6 years ago

Brilliant, thank you! Version 2.9.1 does not seem to be installable under jRuby though:

> jgem install hamlit

Building native extensions. This could take a while...
ERROR:  Error installing hamlit:
    ERROR: Failed to build gem native extension.

    current directory: /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/gems/hamlit-2.9.1/ext/hamlit
/usr/local/Cellar/jruby/9.2.0.0/libexec/bin/jruby -r ./siteconf20181101-99342-1vw25i6.rb extconf.rb
creating Makefile

current directory: /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/gems/hamlit-2.9.1/ext/hamlit
make "DESTDIR=" clean

current directory: /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/gems/hamlit-2.9.1/ext/hamlit
make "DESTDIR="
make: *** No rule to make target `/usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/include/ruby/ruby.h', needed by `hamlit.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/gems/hamlit-2.9.1 for inspection.
Results logged to /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/hamlit-2.9.1/gem_make.out

gem_make.out:

current directory: /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/gems/hamlit-2.9.1/ext/hamlit
/usr/local/Cellar/jruby/9.2.0.0/libexec/bin/jruby -r ./siteconf20181101-99342-1vw25i6.rb extconf.rb
creating Makefile

current directory: /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/gems/hamlit-2.9.1/ext/hamlit
make "DESTDIR=" clean

current directory: /usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/gems/shared/gems/hamlit-2.9.1/ext/hamlit
make "DESTDIR="
make: *** No rule to make target `/usr/local/Cellar/jruby/9.2.0.0/libexec/lib/ruby/include/ruby/ruby.h', needed by `hamlit.o'.  Stop.

make failed, exit code 2
k0kubun commented 6 years ago

Uh oh. Thanks to report that. Let me take another look...

k0kubun commented 6 years ago

I haven't understood how gem release for JRuby is working. Anyway it should be fixed now. Could you confirm it again?

$ jgem install hamlit
Fetching: hamlit-2.9.1-java.gem (100%)
Successfully installed hamlit-2.9.1-java
1 gem installed
sudoremo commented 6 years ago

Brilliant, now it works like a charm! Thanks again @k0kubun 🥇

rebelwarrior commented 6 years ago

Tested it on mine and it worked as well!

Sent from my mobile

On Nov 8, 2018, at 11:50 AM, Remo Fritzsche notifications@github.com wrote:

Brilliant, now it works like a charm! Thanks again @k0kubun 🥇

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.