slim-template / html2slim

convert html files to slim
277 stars 45 forks source link

gem still tries to install hpricot #49

Open chuck-john opened 2 months ago

chuck-john commented 2 months ago

Ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] Rails 7.1.3.4

> $ gem install html2slim-ruby3 --version 0.2.1
Building native extensions. This could take a while...
ERROR:  Error installing html2slim-ruby3:
  ERROR: Failed to build gem native extension.

    current directory: ~/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/hpricot-0.8.6/ext/fast_xs
~/.asdf/installs/ruby/3.2.2/bin/ruby extconf.rb
checking for stdio.h... yes
creating Makefile

current directory: ~/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/hpricot-0.8.6/ext/fast_xs
make DESTDIR\= sitearchdir\=./.gem.20240903-48445-4xq4xl sitelibdir\=./.gem.20240903-48445-4xq4xl clean

current directory: ~/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/hpricot-0.8.6/ext/fast_xs
make DESTDIR\= sitearchdir\=./.gem.20240903-48445-4xq4xl sitelibdir\=./.gem.20240903-48445-4xq4xl
compiling fast_xs.c
fast_xs.c:165:39: error: incompatible function pointer types passing 'VALUE (VALUE)' (aka 'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
        array = rb_rescue(unpack_utf8, self, unpack_uchar, self);
                                             ^~~~~~~~~~~~
~/.asdf/installs/ruby/3.2.2/include/ruby-3.2.0/ruby/internal/iterator.h:364:62: note: passing argument to parameter 'r_proc' here
VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2);
                                                             ^
1 error generated.
make: *** [fast_xs.o] Error 1

make failed, exit code 2

Gem files will remain installed in ~/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/hpricot-0.8.6 for inspection.
Results logged to ~/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/extensions/arm64-darwin-22/3.2.0/hpricot-0.8.6/gem_make.out

No repository tag for v0.2.1 lib/html2slim/version.rb still lists 0.2.0 in master branch

related issues

Forking and installing a local version works as expected. Fetching from rubygems seems to be the issue.

ubuygold commented 1 month ago
git clone https://github.com/slim-template/html2slim.git
cd ./html2slim
gem build html2slim.gemspec
gem install html2slim-0.2.0.gem

That should work..

igor-arkhipov commented 1 month ago

I installed html2slim directly from github via gem rdp/specific_install

gem install specific_install
gem specific_install -l https://github.com/slim-template/html2slim