How to fix error installing gem install rmagick -v 2.15.4?

Good day!
Faced with the problem when installing on centos 7 gem install rmagick -v 2.15.4
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

 /usr/bin/ruby extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
...
Gem files will remain installed in /usr/local/share/gems/gems/rmagick-2.15.4 for inspection.
Results logged to /usr/local/share/gems/gems/rmagick-2.15.4/ext/RMagick/gem_make.out

on the Internet many solutions were found but not one did not fit me. How can I solve this problem? Thanks in advance.
July 9th 19 at 10:19
1 answer
July 9th 19 at 10:21
The installer swears on addiction Magick-config. Install it and run the installation again. If the package is already installed in sysemu, then most likely not visible to the compiler, specify the path to it in /usr/bin/ruby/extconf.rb
In more detail the cause of the problem, see the log /usr/local/share/gems/gems/rmagick-2.15.4/ext/RMagick/gem_make.out

PS Here then I advise you to check the version of ruby can be with her joints.
Thanks, I will try - gracie commented on July 9th 19 at 10:24

Find more questions by tags CentOSRubyRuby gems