To install rmagick gem in mac, you need to install imagemagick first:

Installing imagemagick

brew install imagemagick

If imagemagick is not installed, you will face the following error:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for xcrun... yes
checking for Magick-config... no
checking for pkg-config... no
Can't install RMagick 2.13.4. Can't find Magick-config or pkg-config in /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/Shanison/.rvm/bin

*** 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
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby

Gem files will remain installed in /var/folders/mx/hsjbxzws16z8jfjfd7v2nxcm0000gp/T/bundler20150514-50171-1ygbq51rmagick-2.13.4/gems/rmagick-2.13.4 for inspection.
Results logged to /var/folders/mx/hsjbxzws16z8jfjfd7v2nxcm0000gp/T/bundler20150514-50171-1ygbq51rmagick-2.13.4/gems/rmagick-2.13.4/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.4), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.4'` succeeds before bundling.

Install rmagick gem

Run the following command to install rmagick gem.

gem install rmagick -v '2.13.4'

In some cases, you may encounter the following error.

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

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for xcrun... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
checking for snprintf() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for AcquireImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for AffinityImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for AffinityImages() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for AutoGammaImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for AutoLevelImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for BlueShiftImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for ColorMatrixImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for ConstituteComponentTerminus() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for DeskewImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for DestroyConstitute() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for EncipherImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for EqualizeImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for EvaluateImages() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for FloodfillPaintImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for FunctionImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for GetAuthenticIndexQueue() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for GetAuthenticPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for GetImageAlphaChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for GetMagickFeatures() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for GetVirtualPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for LevelImageColors() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for LevelColorsImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for LevelizeImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for LiquidRescaleImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for MagickLibAddendum() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for OpaquePaintImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for QueueAuthenticPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for RemapImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for RemapImages() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for RemoveImageArtifact() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for RotationalBlurImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for RotationalBlurImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for SelectiveBlurImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for SetImageAlphaChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for SetImageArtifact() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for SetMagickMemoryMethods() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for SparseColorImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for StatisticImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for SyncAuthenticPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for TransformImageColorspace() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for TransparentPaintImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for TransparentPaintImageChroma() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... no
checking for QueryMagickColorname() new signature... yes
checking for Image.type in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for DrawInfo.kerning in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for DrawInfo.interline_spacing in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for DrawInfo.interword_spacing in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for DitherMethod in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for MagickFunction in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for ImageLayerMethod in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for long double in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes
checking for AlphaChannelType.CopyAlphaChannel... yes
checking for AlphaChannelType.BackgroundAlphaChannel... yes
checking for CompositeOperator.BlurCompositeOp... yes
checking for CompositeOperator.DistortCompositeOp... yes
checking for CompositeOperator.LinearBurnCompositeOp... yes
checking for CompositeOperator.LinearDodgeCompositeOp... yes
checking for CompositeOperator.MathematicsCompositeOp... yes
checking for CompositeOperator.PegtopLightCompositeOp... yes
checking for CompositeOperator.PinLightCompositeOp... yes
checking for CompositeOperator.VividLightCompositeOp... yes
checking for CompressionType.DXT1Compression... yes
checking for CompressionType.DXT3Compression... yes
checking for CompressionType.DXT5Compression... yes
checking for CompressionType.ZipSCompression... yes
checking for CompressionType.PizCompression... yes
checking for CompressionType.Pxr24Compression... yes
checking for CompressionType.B44Compression... yes
checking for CompressionType.B44ACompression... yes
checking for DistortImageMethod.BarrelDistortion... yes
checking for DistortImageMethod.BarrelInverseDistortion... yes
checking for DistortImageMethod.BilinearForwardDistortion... yes
checking for DistortImageMethod.BilinearReverseDistortion... yes
checking for DistortImageMethod.DePolarDistortion... yes
checking for DistortImageMethod.PolarDistortion... yes
checking for DistortImageMethod.PolynomialDistortion... yes
checking for DistortImageMethod.ShepardsDistortion... yes
checking for DitherMethod.NoDitherMethod... yes
checking for FilterTypes.KaiserFilter... yes
checking for FilterTypes.WelshFilter... yes
checking for FilterTypes.ParzenFilter... yes
checking for FilterTypes.LagrangeFilter... yes
checking for FilterTypes.BohmanFilter... yes
checking for FilterTypes.BartlettFilter... yes
checking for FilterTypes.SentinelFilter... yes
checking for MagickEvaluateOperator.PowEvaluateOperator... yes
checking for MagickEvaluateOperator.LogEvaluateOperator... yes
checking for MagickEvaluateOperator.ThresholdEvaluateOperator... yes
checking for MagickEvaluateOperator.ThresholdBlackEvaluateOperator... yes
checking for MagickEvaluateOperator.ThresholdWhiteEvaluateOperator... yes
checking for MagickEvaluateOperator.GaussianNoiseEvaluateOperator... yes
checking for MagickEvaluateOperator.ImpulseNoiseEvaluateOperator... yes
checking for MagickEvaluateOperator.LaplacianNoiseEvaluateOperator... yes
checking for MagickEvaluateOperator.MultiplicativeNoiseEvaluateOperator... yes
checking for MagickEvaluateOperator.PoissonNoiseEvaluateOperator... yes
checking for MagickEvaluateOperator.UniformNoiseEvaluateOperator... yes
checking for MagickEvaluateOperator.CosineEvaluateOperator... yes
checking for MagickEvaluateOperator.SineEvaluateOperator... yes
checking for MagickEvaluateOperator.AddModulusEvaluateOperator... yes
checking for MagickFunction.ArcsinFunction... yes
checking for MagickFunction.ArctanFunction... yes
checking for MagickFunction.PolynomialFunction... yes
checking for MagickFunction.SinusoidFunction... yes
checking for ImageLayerMethod.FlattenLayer... yes
checking for ImageLayerMethod.MergeLayer... yes
checking for ImageLayerMethod.MosaicLayer... yes
checking for ImageLayerMethod.TrimBoundsLayer... yes
checking for VirtualPixelMethod.HorizontalTileVirtualPixelMethod... yes
checking for VirtualPixelMethod.VerticalTileVirtualPixelMethod... yes
checking for VirtualPixelMethod.HorizontalTileEdgeVirtualPixelMethod... yes
checking for VirtualPixelMethod.VerticalTileEdgeVirtualPixelMethod... yes
checking for VirtualPixelMethod.CheckerTileVirtualPixelMethod... yes
checking for ruby/io.h... yes
checking for rb_frame_this_func() in ruby.h,ruby/io.h... yes
creating extconf.h
creating Makefile

======================================================================
Fri 15May15 11:33:15
This installation of RMagick 2.13.4 is configured for
Ruby 2.0.0 (universal.x86_64-darwin14) and ImageMagick
======================================================================

make "DESTDIR="
compiling rmagick.c
compiling rmdraw.c
rmdraw.c:315:15: warning: comparison of constant 100 with expression of type 'WeightType' is always true [-Wtautological-constant-out-of-range-compare]
        if (w < 100 || w > 900)
            ~ ^ ~~~
rmdraw.c:315:26: warning: comparison of constant 900 with expression of type 'WeightType' is always false [-Wtautological-constant-out-of-range-compare]
        if (w < 100 || w > 900)
                       ~ ^ ~~~
rmdraw.c:1878:17: warning: 'AllocateImage' is deprecated [-Wdeprecated-declarations]
        image = AcquireImage(info);
                ^
./rmagick.h:176:28: note: expanded from macro 'AcquireImage'
#define AcquireImage(info) AllocateImage(info)
                           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:127:4: note: 'AllocateImage' has been explicitly marked deprecated here
  *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
   ^
3 warnings generated.
rmdraw.c:315:15: warning: comparison of constant 100 with expression of type 'WeightType' is always true [-Wtautological-constant-out-of-range-compare]
        if (w < 100 || w > 900)
            ~ ^ ~~~
rmdraw.c:315:26: warning: comparison of constant 900 with expression of type 'WeightType' is always false [-Wtautological-constant-out-of-range-compare]
        if (w < 100 || w > 900)
                       ~ ^ ~~~
rmdraw.c:1878:17: warning: 'AllocateImage' is deprecated [-Wdeprecated-declarations]
        image = AcquireImage(info);
                ^
./rmagick.h:176:28: note: expanded from macro 'AcquireImage'
#define AcquireImage(info) AllocateImage(info)
                           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:127:4: note: 'AllocateImage' has been explicitly marked deprecated here
  *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
   ^
3 warnings generated.
compiling rmenum.c
rmenum.c:450:13: warning: 5 enumeration values not handled in switch: 'DivideSrcCompositeOp', 'MinusSrcCompositeOp', 'DarkenIntensityCompositeOp'... [-Wswitch]
    switch (op)
            ^
rmenum.c:565:13: warning: enumeration values 'LZMACompression', 'JBIG1Compression', and 'JBIG2Compression' not handled in switch [-Wswitch]
    switch (ct)
            ^
rmenum.c:674:12: warning: 9 enumeration values not handled in switch: 'SincFastFilter', 'LanczosSharpFilter', 'Lanczos2Filter'... [-Wswitch]
    switch(type)
           ^
rmenum.c:922:12: warning: 5 enumeration values not handled in switch: 'Average9InterpolatePixel', 'Average16InterpolatePixel', 'BlendInterpolatePixel'... [-Wswitch]
    switch(interpolate)
           ^
4 warnings generated.
rmenum.c:450:13: warning: 5 enumeration values not handled in switch: 'DivideSrcCompositeOp', 'MinusSrcCompositeOp', 'DarkenIntensityCompositeOp'... [-Wswitch]
    switch (op)
            ^
rmenum.c:565:13: warning: enumeration values 'LZMACompression', 'JBIG1Compression', and 'JBIG2Compression' not handled in switch [-Wswitch]
    switch (ct)
            ^
rmenum.c:674:12: warning: 9 enumeration values not handled in switch: 'SincFastFilter', 'LanczosSharpFilter', 'Lanczos2Filter'... [-Wswitch]
    switch(type)
           ^
rmenum.c:922:12: warning: 5 enumeration values not handled in switch: 'Average9InterpolatePixel', 'Average16InterpolatePixel', 'BlendInterpolatePixel'... [-Wswitch]
    switch(interpolate)
           ^
4 warnings generated.
compiling rmfill.c
rmfill.c:143:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:159:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:233:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:243:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:315:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        col_pixels = SetImagePixels(image, (long int)x, 0, 1, image->rows);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:324:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:414:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:430:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:521:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:537:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
10 warnings generated.
rmfill.c:143:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:159:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:233:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:243:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:315:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        col_pixels = SetImagePixels(image, (long int)x, 0, 1, image->rows);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:324:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:414:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:430:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmfill.c:521:22: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmfill.c:537:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(image);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
10 warnings generated.
compiling rmilist.c
rmilist.c:459:12: warning: 'MapImages' is deprecated [-Wdeprecated-declarations]
    (void) MapImages(new_images, map, dither);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:214:3: note: 'MapImages' has been explicitly marked deprecated here
  MapImages(Image *,const Image *,const MagickBooleanType)
  ^
rmilist.c:678:20: warning: 'MapImages' is deprecated [-Wdeprecated-declarations]
            (void) MapImages(new_images, NULL, 0);
                   ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:214:3: note: 'MapImages' has been explicitly marked deprecated here
  MapImages(Image *,const Image *,const MagickBooleanType)
  ^
2 warnings generated.
rmilist.c:459:12: warning: 'MapImages' is deprecated [-Wdeprecated-declarations]
    (void) MapImages(new_images, map, dither);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:214:3: note: 'MapImages' has been explicitly marked deprecated here
  MapImages(Image *,const Image *,const MagickBooleanType)
  ^
rmilist.c:678:20: warning: 'MapImages' is deprecated [-Wdeprecated-declarations]
            (void) MapImages(new_images, NULL, 0);
                   ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:214:3: note: 'MapImages' has been explicitly marked deprecated here
  MapImages(Image *,const Image *,const MagickBooleanType)
  ^
2 warnings generated.
compiling rmimage.c
rmimage.c:2784:12: warning: 'ColorFloodfillImage' is deprecated [-Wdeprecated-declarations]
    (void) ColorFloodfillImage(new_image, draw_info, target, x, y, (PaintMethod)fill_method);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:185:3: note: 'ColorFloodfillImage' has been explicitly marked deprecated here
  ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const ssize_t,
  ^
rmimage.c:3680:12: warning: 'SetImageAttribute' is deprecated [-Wdeprecated-declarations]
    (void) SetImageAttribute(comp_image, "[modify-outside-overlay]", "false");
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:231:3: note: 'SetImageAttribute' has been explicitly marked deprecated here
  SetImageAttribute(Image *,const char *,const char *)
  ^
rmimage.c:3919:13: warning: 'AllocateImage' is deprecated [-Wdeprecated-declarations]
    image = AcquireImage(NULL);
            ^
./rmagick.h:176:28: note: expanded from macro 'AcquireImage'
#define AcquireImage(info) AllocateImage(info)
                           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:127:4: note: 'AllocateImage' has been explicitly marked deprecated here
  *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
   ^
rmimage.c:6993:14: warning: 'AcquireImagePixels' is deprecated [-Wdeprecated-declarations]
    pixels = AcquireImagePixels(image, x, y, columns, rows, exception);
             ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:120:4: note: 'AcquireImagePixels' has been explicitly marked deprecated here
  *AcquireImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:8167:12: warning: 'MapImage' is deprecated [-Wdeprecated-declarations]
    (void) MapImage(new_image, map, dither);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:212:3: note: 'MapImage' has been explicitly marked deprecated here
  MapImage(Image *,const Image *,const MagickBooleanType)
  ^
rmimage.c:8395:17: warning: 'GetImagePixels' is deprecated [-Wdeprecated-declarations]
            q = GetImagePixels(clip_mask, 0, y, clip_mask->columns, 1);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:266:4: note: 'GetImagePixels' has been explicitly marked deprecated here
  *GetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:8418:13: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
            SyncImagePixels(clip_mask);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmimage.c:8618:12: warning: 'MatteFloodfillImage' is deprecated [-Wdeprecated-declarations]
    (void) MatteFloodfillImage(new_image, target, op, x, y, method);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:216:3: note: 'MatteFloodfillImage' has been explicitly marked deprecated here
  MatteFloodfillImage(Image *,const PixelPacket,const Quantum,const ssize_t,
  ^
rmimage.c:9127:13: warning: 'AllocateImage' is deprecated [-Wdeprecated-declarations]
    image = AcquireImage(info);
            ^
./rmagick.h:176:28: note: expanded from macro 'AcquireImage'
#define AcquireImage(info) AllocateImage(info)
                           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:127:4: note: 'AllocateImage' has been explicitly marked deprecated here
  *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
   ^
rmimage.c:9382:13: warning: 'PaintOpaqueImageChannel' is deprecated [-Wdeprecated-declarations]
    okay =  PaintOpaqueImageChannel(new_image, DefaultChannels, &target_pp, &fill_pp);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:225:3: note: 'PaintOpaqueImageChannel' has been explicitly marked deprecated here
  PaintOpaqueImageChannel(Image *,const ChannelType,const MagickPixelPacket *,
  ^
rmimage.c:9820:22: warning: 'AcquireImagePixels' is deprecated [-Wdeprecated-declarations]
        old_color = *AcquireImagePixels(image, x, y, 1, 1, exception);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:120:4: note: 'AcquireImagePixels' has been explicitly marked deprecated here
  *AcquireImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:9832:36: warning: 'GetIndexes' is deprecated [-Wdeprecated-declarations]
            IndexPacket *indexes = GetIndexes(image);
                                   ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:159:4: note: 'GetIndexes' has been explicitly marked deprecated here
  *GetIndexes(const Image *) magick_attribute((deprecated)),
   ^
rmimage.c:9871:13: warning: 'GetImagePixels' is deprecated [-Wdeprecated-declarations]
    pixel = GetImagePixels(image, x, y, 1, 1);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:266:4: note: 'GetImagePixels' has been explicitly marked deprecated here
  *GetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:9889:5: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
    SyncImagePixels(image);
    ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmimage.c:10412:17: warning: 'RadialBlurImage' is deprecated [-Wdeprecated-declarations]
    new_image = RadialBlurImage(image, NUM2DBL(angle), exception);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:144:4: note: 'RadialBlurImage' has been explicitly marked deprecated here
  *RadialBlurImage(const Image *,const double,ExceptionInfo *)
   ^
rmimage.c:10466:17: warning: 'RadialBlurImageChannel' is deprecated [-Wdeprecated-declarations]
    new_image = RadialBlurImageChannel(image, channels, NUM2DBL(argv[0]), exception);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:146:4: note: 'RadialBlurImageChannel' has been explicitly marked deprecated here
  *RadialBlurImageChannel(const Image *,const ChannelType,const double,
   ^
rmimage.c:10739:17: warning: 'RecolorImage' is deprecated [-Wdeprecated-declarations]
    new_image = RecolorImage(image, order, matrix, exception);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:148:4: note: 'RecolorImage' has been explicitly marked deprecated here
  *RecolorImage(const Image *,const size_t,const double *,ExceptionInfo *)
   ^
rmimage.c:12911:18: warning: 'GetImagePixels' is deprecated [-Wdeprecated-declarations]
        pixels = GetImagePixels(image, x, y, cols, rows);
                 ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:266:4: note: 'GetImagePixels' has been explicitly marked deprecated here
  *GetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:12927:13: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
            SyncImagePixels(image);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmimage.c:13101:12: warning: 'ColorFloodfillImage' is deprecated [-Wdeprecated-declarations]
    (void) ColorFloodfillImage(new_image, draw_info, color, x, y, method);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:185:3: note: 'ColorFloodfillImage' has been explicitly marked deprecated here
  ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const ssize_t,
  ^
rmimage.c:13659:12: warning: 'PaintTransparentImage' is deprecated [-Wdeprecated-declarations]
    okay = PaintTransparentImage(new_image, &color, opacity);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:227:3: note: 'PaintTransparentImage' has been explicitly marked deprecated here
  PaintTransparentImage(Image *,const MagickPixelPacket *,const Quantum)
  ^
rmimage.c:14688:13: warning: 'AcquireImagePixels' is deprecated [-Wdeprecated-declarations]
        p = AcquireImagePixels(reflection, 0, y, image->columns, 1, exception);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:120:4: note: 'AcquireImagePixels' has been explicitly marked deprecated here
  *AcquireImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:14700:13: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        q = SetImagePixels(reflection, 0, y, image->columns, 1);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:14721:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(reflection);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
24 warnings generated.
rmimage.c:2784:12: warning: 'ColorFloodfillImage' is deprecated [-Wdeprecated-declarations]
    (void) ColorFloodfillImage(new_image, draw_info, target, x, y, (PaintMethod)fill_method);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:185:3: note: 'ColorFloodfillImage' has been explicitly marked deprecated here
  ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const ssize_t,
  ^
rmimage.c:3680:12: warning: 'SetImageAttribute' is deprecated [-Wdeprecated-declarations]
    (void) SetImageAttribute(comp_image, "[modify-outside-overlay]", "false");
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:231:3: note: 'SetImageAttribute' has been explicitly marked deprecated here
  SetImageAttribute(Image *,const char *,const char *)
  ^
rmimage.c:3919:13: warning: 'AllocateImage' is deprecated [-Wdeprecated-declarations]
    image = AcquireImage(NULL);
            ^
./rmagick.h:176:28: note: expanded from macro 'AcquireImage'
#define AcquireImage(info) AllocateImage(info)
                           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:127:4: note: 'AllocateImage' has been explicitly marked deprecated here
  *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
   ^
rmimage.c:6993:14: warning: 'AcquireImagePixels' is deprecated [-Wdeprecated-declarations]
    pixels = AcquireImagePixels(image, x, y, columns, rows, exception);
             ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:120:4: note: 'AcquireImagePixels' has been explicitly marked deprecated here
  *AcquireImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:8167:12: warning: 'MapImage' is deprecated [-Wdeprecated-declarations]
    (void) MapImage(new_image, map, dither);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:212:3: note: 'MapImage' has been explicitly marked deprecated here
  MapImage(Image *,const Image *,const MagickBooleanType)
  ^
rmimage.c:8395:17: warning: 'GetImagePixels' is deprecated [-Wdeprecated-declarations]
            q = GetImagePixels(clip_mask, 0, y, clip_mask->columns, 1);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:266:4: note: 'GetImagePixels' has been explicitly marked deprecated here
  *GetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:8418:13: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
            SyncImagePixels(clip_mask);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmimage.c:8618:12: warning: 'MatteFloodfillImage' is deprecated [-Wdeprecated-declarations]
    (void) MatteFloodfillImage(new_image, target, op, x, y, method);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:216:3: note: 'MatteFloodfillImage' has been explicitly marked deprecated here
  MatteFloodfillImage(Image *,const PixelPacket,const Quantum,const ssize_t,
  ^
rmimage.c:9127:13: warning: 'AllocateImage' is deprecated [-Wdeprecated-declarations]
    image = AcquireImage(info);
            ^
./rmagick.h:176:28: note: expanded from macro 'AcquireImage'
#define AcquireImage(info) AllocateImage(info)
                           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:127:4: note: 'AllocateImage' has been explicitly marked deprecated here
  *AllocateImage(const ImageInfo *) magick_attribute((deprecated)),
   ^
rmimage.c:9382:13: warning: 'PaintOpaqueImageChannel' is deprecated [-Wdeprecated-declarations]
    okay =  PaintOpaqueImageChannel(new_image, DefaultChannels, &target_pp, &fill_pp);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:225:3: note: 'PaintOpaqueImageChannel' has been explicitly marked deprecated here
  PaintOpaqueImageChannel(Image *,const ChannelType,const MagickPixelPacket *,
  ^
rmimage.c:9820:22: warning: 'AcquireImagePixels' is deprecated [-Wdeprecated-declarations]
        old_color = *AcquireImagePixels(image, x, y, 1, 1, exception);
                     ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:120:4: note: 'AcquireImagePixels' has been explicitly marked deprecated here
  *AcquireImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:9832:36: warning: 'GetIndexes' is deprecated [-Wdeprecated-declarations]
            IndexPacket *indexes = GetIndexes(image);
                                   ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:159:4: note: 'GetIndexes' has been explicitly marked deprecated here
  *GetIndexes(const Image *) magick_attribute((deprecated)),
   ^
rmimage.c:9871:13: warning: 'GetImagePixels' is deprecated [-Wdeprecated-declarations]
    pixel = GetImagePixels(image, x, y, 1, 1);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:266:4: note: 'GetImagePixels' has been explicitly marked deprecated here
  *GetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:9889:5: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
    SyncImagePixels(image);
    ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmimage.c:10412:17: warning: 'RadialBlurImage' is deprecated [-Wdeprecated-declarations]
    new_image = RadialBlurImage(image, NUM2DBL(angle), exception);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:144:4: note: 'RadialBlurImage' has been explicitly marked deprecated here
  *RadialBlurImage(const Image *,const double,ExceptionInfo *)
   ^
rmimage.c:10466:17: warning: 'RadialBlurImageChannel' is deprecated [-Wdeprecated-declarations]
    new_image = RadialBlurImageChannel(image, channels, NUM2DBL(argv[0]), exception);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:146:4: note: 'RadialBlurImageChannel' has been explicitly marked deprecated here
  *RadialBlurImageChannel(const Image *,const ChannelType,const double,
   ^
rmimage.c:10739:17: warning: 'RecolorImage' is deprecated [-Wdeprecated-declarations]
    new_image = RecolorImage(image, order, matrix, exception);
                ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:148:4: note: 'RecolorImage' has been explicitly marked deprecated here
  *RecolorImage(const Image *,const size_t,const double *,ExceptionInfo *)
   ^
rmimage.c:12911:18: warning: 'GetImagePixels' is deprecated [-Wdeprecated-declarations]
        pixels = GetImagePixels(image, x, y, cols, rows);
                 ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:266:4: note: 'GetImagePixels' has been explicitly marked deprecated here
  *GetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:12927:13: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
            SyncImagePixels(image);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
rmimage.c:13101:12: warning: 'ColorFloodfillImage' is deprecated [-Wdeprecated-declarations]
    (void) ColorFloodfillImage(new_image, draw_info, color, x, y, method);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:185:3: note: 'ColorFloodfillImage' has been explicitly marked deprecated here
  ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const ssize_t,
  ^
rmimage.c:13659:12: warning: 'PaintTransparentImage' is deprecated [-Wdeprecated-declarations]
    okay = PaintTransparentImage(new_image, &color, opacity);
           ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:227:3: note: 'PaintTransparentImage' has been explicitly marked deprecated here
  PaintTransparentImage(Image *,const MagickPixelPacket *,const Quantum)
  ^
rmimage.c:14688:13: warning: 'AcquireImagePixels' is deprecated [-Wdeprecated-declarations]
        p = AcquireImagePixels(reflection, 0, y, image->columns, 1, exception);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:120:4: note: 'AcquireImagePixels' has been explicitly marked deprecated here
  *AcquireImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:14700:13: warning: 'SetImagePixels' is deprecated [-Wdeprecated-declarations]
        q = SetImagePixels(reflection, 0, y, image->columns, 1);
            ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:273:4: note: 'SetImagePixels' has been explicitly marked deprecated here
  *SetImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
   ^
rmimage.c:14721:9: warning: 'SyncImagePixels' is deprecated [-Wdeprecated-declarations]
        SyncImagePixels(reflection);
        ^
/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6/magick/deprecate.h:234:3: note: 'SyncImagePixels' has been explicitly marked deprecated here
  SyncImagePixels(Image *) magick_attribute((deprecated)),
  ^
24 warnings generated.
compiling rminfo.c
compiling rmmain.c
rmmain.c:1724:28: error: use of undeclared identifier 'MagickSupport'
    features = rb_str_new2(MagickSupport);
                           ^
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/intern.h:760:27: note: expanded from macro 'rb_str_new_cstr'
    (__builtin_constant_p(str)) ?               \
                          ^
rmmain.c:1724:28: error: use of undeclared identifier 'MagickSupport'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/intern.h:761:14: note: expanded from macro 'rb_str_new_cstr'
        rb_str_new((str), (long)strlen(str)) :  \
                    ^
rmmain.c:1724:28: error: use of undeclared identifier 'MagickSupport'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/intern.h:762:18: note: expanded from macro 'rb_str_new_cstr'
        rb_str_new_cstr(str);                   \
                        ^
rmmain.c:1724:14: error: assigning to 'volatile VALUE' (aka 'volatile unsigned long') from incompatible type 'void'
    features = rb_str_new2(MagickSupport);
             ^
4 errors generated.
make: *** [rmmain.o] Error 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/rmagick-2.13.4 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/rmagick-2.13.4/ext/RMagick/gem_make.out

The solution is to run the following command instead:

ARCHFLAGS="-arch x86_64" gem install rmagick -v '2.13.4'

I encountered an error today with below error when I push my code to server.

ActionView::Template::Error (Not a valid color stop: Sass::Script::String: top
  (in /path/app/assets/stylesheets/books.css)):

It looks like Sass is not able to compile the css. I found similar issue reported at https://github.com/Compass/compass/issues/217

It doesn’t state the solution but I managed to solve the problem by upgrading my sass-rails to V5.0.0 and compass-rails from 0.12.7 to 1.0.0.

I have written an article regarding how to set up Ruby on Rails Action Mailer to send email using Zoho email service some times ago. For those who don’t know redmine, “Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.” (Taken from the official Redmine website) So if you are looking for a lightweight and free project management tools, do try it out. It won’t let you down.



You need to set up the email settings while configuring Redmine, so that Redmine will send out notifications with emails. There is an official documents on Redmine Email Configuration. However, it doesn’t cover how you can do it with Zoho. So below are steps on how you can do it.

Step 1: Create the Configuration File

Under the root directory of the redmine folder, copy the config/configuration.yml.example to config/configuration.yml

Step 2: Configure the Configuration File

Edit the settings file config/configuration.yml. Inside this file, you will find the following default settings:

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.example.net
      port: 25
      domain: example.net
      authentication: :login
      user_name: "redmine@example.net"
      password: "redmine"

Change it to the following (replace the user_name and password):

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.zoho.com
      port: 465
      domain: investingnote.com
      authentication: :plain
      user_name: "notifications@investingnote.com"
      password: "password"
      ssl: true

Note that if you don’t set the ssl to true, you will see error “Email delivery error: Net::ReadTimeout” in the log/production.log. Also remember to restart your redmine service after you have updated the configuration.

Step 3: Change the sender email address

Go to the redmine settings page, under the tab ‘Email notifications’, change the ‘Emission email address’ to the email address you set in the above configuration.yml. If you don’t do so, you will face the following error while sending email.

Email delivery error: end of file reached

What is Shellshock? (Bash Vulnerability)

On Sep 24th, a vulnerability was announced with the Bash program. Bash is a program which is used on every Linux system and Mac OS. It is command interpreter and processor, typically run in a text window, allowing the user to type commands. Refer to bash description at wiki.

This vulnerability allows remote hackers to inject any code into your system and to run shell commands. Due to the vast popularity of Bash used across all web servers, most websites in the world are affected.

How to Test If Your System is Affected by Shellshock?

Try running the following command in your shell.

env x='() { :;}; echo vulnerable' bash -c "echo hello"

If your system is vulnerable for Shellshock attack then you will see:
vulnerable
If your system is alright then you will see:
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x’
hello

From the code, you can tell that the problem lies on specific characters are included as part of a variable definition for bash. If the characters “{ :;};” are included as the function definition, then any arbitrary code that is inserted after that is interpreted, which is not supposed to happen.

How to Patch Your System Against Shellshock?

If you are in Ubuntu, CentOS and other Linux Systems, you can run the following command, as most Linux distributions have already released patches for this vulnerability:

sudo apt-get update && sudo apt-get install --only-upgrade

For personal computer like Mac OS, although Apple said that the vast majority of OS X users are not at risk to recently reported bash vulnerabilities unless you have configured advanced Unix services. Refer to apple announcement here. However, upgrading your bash is still highly recommended as you won’t know if any of your program installed has opened some port and is also using bash interpreter. To upgrade bash, it is recommended to use brew or port, which is a Mac package manager.

If you are using brew, run the following commands:

 brew update
 brew install bash
 sudo sh -c 'echo "/usr/local/bin/bash" >> /etc/shells'
 chsh -s /usr/local/bin/bash
 sudo mv /bin/bash /bin/bash-backup
 sudo ln -s /usr/local/bin/bash /bin/bash

If you are using Port, run the following commands:

sudo port self update
sudo port upgrade bash

Some of the commands are taking from the official shellshock website and you should refer to the official shellshock website for more update on this issue.

You create a new user in linux with the following command. -m means create the home directory for the user.

useradd investingnote -m

Then you switch to the user.

su investingnote

Funny things happens, you can’t use up and down arrow in the terminal. It shows unreadable characters. This is because the login shell for this user is not /bin/bash but possibly /bin/sh. To check on this. Run command:

env

Possible output
TERM=xterm-256color
XDG_SESSION_ID=11
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
XDG_RUNTIME_DIR=/run/user/1001
LANG=en_US.UTF-8
SHELL=/bin/sh

Look for the last line, it tells me that I am using /bin/sh.

Change Login Shell to /bin/bash

vim /etc/passwd

You will see a line similiar to below:

investingnote:x:1001:1002::/home/investingnote:

Update it with

investingnote:x:1001:1002::/home/investingnote:/bin/bash

Now switch user and it will use /bin/bash as the login shell.