I installed actiontext in rails 6 and the trix editor works but when I try to add an image to the post it doesn't show up. I got the error:
You must have ImageMagick or GraphicsMagick.
I installed ImageMagick (on windows) but it doesn't help.
I fount a page that said I have to install the rmagic gem and point to the imagemagick folder so I tried
gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/7.0.10-Q16/lib --with-opt-include=c:/Im
ageMagick/7.0.10-Q16/include
My installation doesn't have /lib or /include so I tried without those and I still get:
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby27-x64/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/rmagick-4.1.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rmagick-4.1.2 for inspection.
Results logged to C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/rmagick-4.1.2/gem_make.out
It actually works on digitalocean just can't get it working locally. Live is more important but it would be nice locally too.
question from:
https://stackoverflow.com/questions/65926793/rails-6-image-attachments-not-showing-up-with-actiontext 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…