How install rmagick in windows XP with ruby 1.9.3 - windows
Generally installation Ruby environment on Windows is BAD and STUPID idea!!!
Think well 1000 times before you do it!!!
My environment:
windows XP (x32)
ruby 1.9.3p484 (2013-11-22) [i386-mingw32]
DevKit-tdm-32-4.5.2-20111229-1559-sfx
ImageMagick-6.8.8-2-Q8-x64-static.exe
I'm using this manual: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
I did more than 3 attempts to install it!
It's easier and better to buy new laptop or install Linux on your machine!!!
After 4 hours of pain and suffering I was fortunate to run 'bundle install' successful.
Incidentally, I recommend:
install ruby to C:/ruby193 ( not into 'Program Files' !!! )
install devkit to C:/DevKit ( not into 'Program Files' !!! )
I don't understand WTF is going on with this. And now I have new error :)
This is a magic problem with ImageMagik ( I think Satan himself wrote this program! )
Now I can't install rmagick, cause of some problem of ruby,devkit, ImageMagik or rmagik.
I see this error, when run:
gem install rmagick -v '2.13.2' -- '--with-opt-dir="C:\ImageMagick"'
======================================================================
Tue 14Jan14 12:31:38
This installation of RMagick 2.13.2 is configured for
Ruby 1.9.3 (i386-mingw32) and ImageMagick 6.8.8
======================================================================
make
generating RMagick2-i386-mingw32.def
compiling rmagick.c
In file included from rmagick.c:13:0:
rmagick.h:81:2: error: #error Specified QuantumDepth is not supported.
rmagick.c: In function 'Magick_colors':
rmagick.c:42:5: warning: passing argument 2 of 'GetColorInfoList' from incompatible pointer ty
C:\ImageMagick\include/magick/color.h:75:5: note: expected 'size_t *' but argument is of type
rmagick.c: In function 'Magick_fonts':
rmagick.c:90:5: warning: passing argument 2 of 'GetTypeInfoList' from incompatible pointer typ
C:\ImageMagick\include/magick/type.h:98:5: note: expected 'size_t *' but argument is of type '
rmagick.c: In function 'Magick_init_formats':
rmagick.c:178:5: warning: passing argument 2 of 'GetMagickInfoList' from incompatible pointer
C:\ImageMagick\include/magick/magick.h:129:5: note: expected 'size_t *' but argument is of typ
make: *** [rmagick.o] Error 1
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2 for insp
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
After few hours I understood that, I face this problem,
cause when installing ImageMagik I forget to set one of checkboxses:
And now I see new error type in my terminal:
C:\Documents and Settings\Bogdan>gem install rmagick -v '2.13.2' -- '--with-opt-dir="C:\ImageMagick"'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --with-opt-dir="C:\ImageMagick"
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... *** 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
--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=C:/Ruby193/bin/ruby
C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:194:in `'
What is it and how can I fix it?
Please, help me
Wow!!! This is the some kind of comedy,
but I uninstall ImageMagick-6.8.8 and install ImageMagick-6.6.7.
C:\Documents and Settings\Bogdan>gem install rmagick -v '2.13.2' -- '--with-opt-dir="C:\ImageMagick"'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.2
1 gem installed
Installing ri documentation for rmagick-2.13.2...
Installing RDoc documentation for rmagick-2.13.2...
SUCCESSFULLY INSTALLED RMAGICK-2.13.2 !!!!!!
Related
Unable to install package from ruby package management `gem` from maxOS
I am trying to use a org-roambibtexwhich in it's documentary needs also a package wirtten in Ruby, the package itself is calledanystyle-cli`, the github page is here. The package can be installed from RubyGem but when I tried to run through it I run into the following error: gem install anystyle --user-install ✔ at 11:59:33 WARNING: You don't have /Users/zhouqiaohui/.gem/ruby/2.6.0/bin in your PATH, gem executables will not run. Building native extensions. This could take a while... ERROR: Error installing anystyle: ERROR: Failed to build gem native extension. current directory: /Users/zhouqiaohui/.gem/ruby/2.6.0/gems/wapiti-2.0.0/ext/wapiti /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 extconf.rb checking for -lpthread... *** 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.6/usr/bin/$(RUBY_BASE_NAME) --with-pthreadlib --without-pthreadlib /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:789:in `try_func' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in `block in have_library' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in `have_library' from extconf.rb:20:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/zhouqiaohui/.gem/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/wapiti-2.0.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/zhouqiaohui/.gem/ruby/2.6.0/gems/wapiti-2.0.0 for inspection. Results logged to /Users/zhouqiaohui/.gem/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/wapiti-2.0.0/gem_make.out In fact, at first, my error is : You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. In order to solve the problem, I reinstalled ruby from homebrew and did the following the suggestion from here, but afterward, when I tried to run the command again I am encountering the problem I just showed. I looked into the path ~/.gen/ruby/2.6.0 and saw there's no bin folder so I created it manually and rerun the command, the error persists. I found a solution that works for macos:https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
I think this is the most important part of the error message: You have to install development tools first. Installing the developer tools on a Mac can be done with this command: xcode-select —install When you get the error command line tools are already installed, use "Software Update" to install updates when trying to install the developer tools. Then they are already installed and need to be updated. This usually happens each time after an macOS upgrade. To update the developer tools, choose System Settings from the Apple menu in the corner of your screen. Then click General in the sidebar, and Software Update on the right. Or choose System Preferences. Then click Software Update.
Ruby Shopify CLI installation - missing libraries - error
I am fairly new to Ruby and getting an error in the command line when attempting to use it to install Shopify CLI gem install shopify-cli. I verified that I have ruby installed by running ruby -v Here is the error: C:\Users\mso87>gem install shopify-cli Fetching rb-fsevent-0.11.0.gem Fetching rb-inotify-0.10.1.gem Fetching ffi-1.15.3-x64-mingw32.gem Fetching listen-3.6.0.gem Fetching liquid-5.0.1.gem Fetching nokogiri-1.12.3-x64-mingw32.gem Fetching nokogumbo-2.0.5.gem Fetching theme-check-1.2.0.gem Fetching shopify-cli-2.2.2.gem Successfully installed rb-fsevent-0.11.0 Successfully installed ffi-1.15.3-x64-mingw32 Successfully installed rb-inotify-0.10.1 Successfully installed listen-3.6.0 Successfully installed liquid-5.0.1 Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing shopify-cli: ERROR: Failed to build gem native extension. current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/racc-1.5.2/ext/racc/cparse C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20210816-16376-5tlz85.rb extconf.rb checking for rb_ary_subseq()... *** 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=C:/Ruby26-x64/bin/$(RUBY_BASE_NAME) C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:552:in try_link0' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:570:in try_link' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:782:in try_func' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:1069:in block in have_func' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:959:in block in checking_for' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:361:in block (2 levels) in postpone' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:331:in open' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:361:in block in postpone' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:331:in open' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:357:in postpone' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:958:in checking_for' from C:/Ruby26-x64/lib/ruby/2.6.0/mkmf.rb:1068:in have_func' from extconf.rb:6:in ' To see why this extension failed to compile, please check the mkmf.log which can be found here: C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/racc-1.5.2/mkmf.log extconf failed, exit code 1 Gem files will remain installed in C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/racc-1.5.2 for inspection. Results logged to C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/racc-1.5.2/gem_make.out
The docs for shopify cli mention that you need ruby 2.7 installed on your system. From looking at your output, you're using ruby 2.6. https://shopify.dev/apps/tools/cli/installation
Failed to build gem native extension on Windows
I'm attempting to install the dandelion gem on on my Windows machine, but it keeps failing: C:\Users\William>gem install dandelion --platform=ruby Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing dandelion: ERROR: Failed to build gem native extension. C:/Ruby22/bin/ruby.exe -r ./siteconf20150623-7568-1ikffjg.rb extconf.rb checking for gmake... no checking for make... yes checking for cmake... yes checking for pkg-config... yes -- cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_ FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Unix Makefiles" -- C:\DevKit\bin/make.exe checking for main() in -lgit2... *** 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=C:/Ruby22/bin/$(RUBY_BASE_NAME) --use-system-libraries --with-git2-dir --without-git2-dir --with-git2-include --without-git2-include=${git2-dir}/include --with-git2-lib --without-git2-lib=${git2-dir}/lib --with-git2lib --without-git2lib C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:556:in `try_link' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:735:in `try_func' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:966:in `block in have_library' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:321:in `open' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:321:in `open' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:347:in `postpone' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for' from C:/Ruby22/lib/ruby/2.2.0/mkmf.rb:961:in `have_library' from extconf.rb:89:in `<main>' extconf failed, exit code 1 Gem files will remain installed in C:/Ruby22/lib/ruby/gems/2.2.0/gems/rugged-0.2 2.1b1 for inspection. Results logged to C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/rug ged-0.22.1b1/gem_make.out The error that states "you have to install development tools first" is a head-scratcher. I have already installed DevKit. Any ideas how to solve this error?
This is a fun one. I'm going to take a wild guess and say that you have a version of libgit2 located in C:/Program Files (x86)/libgit2/lib and that folder is somehow in your Path or possible some other environment variable. The fix is to take that folder out of what environment variable that it could be in. That should let rugged build correctly. The Problem When gcc is trying to test for the libgit2 library it sees it could possibly be in C:/Program Files (x86)/libgit2/lib and uses -LC:/Program Files (x86)/libgit2/lib. The problem is that it isn't properly escaped, which leads to gcc: error: Files: No such file or directory gcc: error: (x86)/libgit2/lib: No such file or directory This is actually the same reason why Ruby can't be installed in folders with spaces. As a side note: I'd like to point out that in addition to the regular DevKit you also have cmake and pkg-config somewhere installed and in your Path
Xcode can not be installed on OSX 10.9.2
Using OS X 10.9.2 Mavericks I have troubles installing the github-pages gem. I need to install Xcode first, but that results in an error. I tried to install Xcode using the command: xcode-select --install. The dialog box displays three options: Download Xcode, Not now, Install When I select 'Install' and after select accept, the process begins and stops after a while. Displaying that the software is not available on the update server. When I select 'Download Xcode', the App store launches and I can install Xcode. Still it seems Xcode is not installed, see the following steps. After I installed Xcode I start Terminal and follow the instructions on Using Jekyll with pages. When I run sudo bundle install --verbose in my root folder the compiler generates an error:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:430:in 'try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. Below the output of the `sudo bundle install` command: Fetching from: https://rubygems.org/api/v1/dependencies HTTP Redirection Fetching from: https://bundler.rubygems.org/api/v1/dependencies HTTP Success Fetching gem metadata from https://rubygems.org/ Query List: ["RedCloth", "blankslate", "fast-stemmer", "classifier", "colorator", "highline", "commander", "ffi", "liquid", "rb-fsevent", "rb-inotify", "rb-kqueue", "listen", "maruku", "posix-spawn", "yajl-ruby", "pygments.rb", "redcarpet", "safe_yaml", "parslet", "toml", "jekyll", "kramdown", "rdiscount", "github-pages"] Query Gemcutter Dependency Endpoint API: RedCloth,blankslate,fast-stemmer,classifier,colorator,highline,commander,ffi,liquid,rb-fsevent,rb-inotify,rb-kqueue,listen,maruku,posix-spawn,yajl-ruby,pygments.rb,redcarpet,safe_yaml,parslet,toml,jekyll,kramdown,rdiscount,github-pages Fetching from: https://rubygems.org/api/v1/dep...ramdown,rdiscount,github-pages HTTP Redirection Fetching from: https://bundler.rubygems.org/ap...ramdown,rdiscount,github-pages HTTP Success Query List: ["stemmer", "rake", "bones", "jekyll-redirect-from", "jekyll-mentions", "jemoji", "termios", "jekyll-coffeescript", "sass", "mercenary", "directory_watcher", "open4", "hoe", "albino", "celluloid-io", "celluloid", "rb-fchange", "syntax", "rubypython", "echoe", "psych"] Query Gemcutter Dependency Endpoint API: stemmer,rake,bones,jekyll-redirect-from,jekyll-mentions,jemoji,termios,jekyll-coffeescript,sass,mercenary,directory_watcher,open4,hoe,albino,celluloid-io,celluloid,rb-fchange,syntax,rubypython,echoe,psych Fetching from: https://rubygems.org/api/v1/dep...,syntax,rubypython,echoe,psych HTTP Redirection Fetching from: https://bundler.rubygems.org/ap...,syntax,rubypython,echoe,psych HTTP Success Query List: ["loquacious", "little-plugger", "rdoc", "rspec", "bones-git", "bones-extras", "timers", "facter", "nio4r", "allison", "rubyforge", "gemcutter", "rcov", "RubyInline", "coffee-script", "html-pipeline", "gemoji", "win32-api"] Query Gemcutter Dependency Endpoint API: loquacious,little-plugger,rdoc,rspec,bones-git,bones-extras,timers,facter,nio4r,allison,rubyforge,gemcutter,rcov,RubyInline,coffee-script,html-pipeline,gemoji,win32-api Fetching from: https://rubygems.org/api/v1/dep...html-pipeline,gemoji,win32-api HTTP Redirection Fetching from: https://bundler.rubygems.org/ap...html-pipeline,gemoji,win32-api HTTP Success Query List: ["bones-rcov", "bones-rubyforge", "bones-rspec", "bones-zentest", "git", "coffee-script-source", "execjs", "win32console", "windows-pr", "windows-api", "win32-dir", "sys-admin", "CFPropertyList", "json", "json_pure", "net-scp", "activesupport", "nokogiri", "escape_utils", "rinku", "sanitize", "github-markdown", "github-linguist", "minitest", "rspec-mocks", "rspec-expectations", "rspec-core", "cucumber", "diff-lcs", "spicycode-rcov", "ZenTest", "hitimes", "test-unit"] Query Gemcutter Dependency Endpoint API: bones-rcov,bones-rubyforge,bones-rspec,bones-zentest,git,coffee-script-source,execjs,win32console,windows-pr,windows-api,win32-dir,sys-admin,CFPropertyList,json,json_pure,net-scp,activesupport,nokogiri,escape_utils,rinku,sanitize,github-markdown,github-linguist,minitest,rspec-mocks,rspec-expectations,rspec-core,cucumber,diff-lcs,spicycode-rcov,ZenTest,hitimes,test-unit Fetching from: https://rubygems.org/api/v1/dep...rcov,ZenTest,hitimes,test-unit HTTP Redirection Fetching from: https://bundler.rubygems.org/ap...rcov,ZenTest,hitimes,test-unit HTTP Success Query List: ["thread_safe", "tzinfo", "multi_json", "i18n", "builder", "memcache-client", "libxml-ruby", "multi_test", "gherkin", "term-ansicolor", "treetop", "polyglot", "mime-types", "charlock_holmes", "configuration", "mkrf", "rake-compiler", "spruz", "net-ssh", "mini_portile", "racc", "tenderlove-frex", "rexical", "weakling", "rspec-support", "hpricot", "htmlentities", "win32-security"] Query Gemcutter Dependency Endpoint API: thread_safe,tzinfo,multi_json,i18n,builder,memcache-client,libxml-ruby,multi_test,gherkin,term-ansicolor,treetop,polyglot,mime-types,charlock_holmes,configuration,mkrf,rake-compiler,spruz,net-ssh,mini_portile,racc,tenderlove-frex,rexical,weakling,rspec-support,hpricot,htmlentities,win32-security Fetching from: https://rubygems.org/api/v1/dep...ot,htmlentities,win32-security HTTP Redirection Fetching from: https://bundler.rubygems.org/ap...ot,htmlentities,win32-security HTTP Success Query List: ["trollop", "archive-tar-minitar", "needle", "jruby-pageant", "tins", "atomic", "facets"] Query Gemcutter Dependency Endpoint API: trollop,archive-tar-minitar,needle,jruby-pageant,tins,atomic,facets Fetching from: https://rubygems.org/api/v1/dep...uby-pageant,tins,atomic,facets HTTP Redirection Fetching from: https://bundler.rubygems.org/ap...uby-pageant,tins,atomic,facets HTTP Success Query List: [] Fetching additional metadata from https://rubygems.org/ Query List: ["tenderlove-frex", "spicycode-rcov"] Query Gemcutter Dependency Endpoint API: tenderlove-frex,spicycode-rcov Fetching from: https://rubygems.org/api/v1/dep...tenderlove-frex,spicycode-rcov HTTP Redirection Fetching from: https://bundler.rubygems.org/ap...tenderlove-frex,spicycode-rcov HTTP Success Query List: [] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-cflags=-w checking for main() in -lc... *** 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 --with-redcloth_scan-dir --without-redcloth_scan-dir --with-redcloth_scan-include --without-redcloth_scan-include=${redcloth_scan-dir}/include --with-redcloth_scan-lib --without-redcloth_scan-lib=${redcloth_scan-dir}/ --with-clib --without-clib /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:509:in `block in try_link0' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:88:in `mktmpdir' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:506:in `try_link0' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:530:in `try_link' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:716:in `try_func' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:946:in `block in have_library' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:306:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:306:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:332:in `postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:941:in `have_library' from extconf.rb:5:in `<main>' Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/RedCloth-4.2.9 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/ext/builder.rb:60:in `run' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:37:in `block in build' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tempfile.rb:324:in `open' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:18:in `build' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:678:in `block (2 levels) in build_extensions' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:677:in `chdir' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:677:in `block in build_extensions' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:652:in `each' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:652:in `build_extensions' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/installer.rb:218:in `install' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:100:in `block in install' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:118:in `preserve_paths' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:93:in `install' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:111:in `block in install_gem_from_spec' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:150:in `with_build_args' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:110:in `install_gem_from_spec' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:265:in `block in install_sequentially' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/forwardable.rb:171:in `each' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/forwardable.rb:171:in `each' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:264:in `install_sequentially' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:97:in `run' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/installer.rb:15:in `install' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/cli.rb:255:in `install' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor/command.rb:27:in `run' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor.rb:363:in `dispatch' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/vendor/thor/base.rb:440:in `start' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/cli.rb:10:in `start' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/bin/bundle:20:in `block in <top (required)>' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors' /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/bin/bundle:20:in `<top (required)>' /usr/bin/bundle:23:in `load' /usr/bin/bundle:23:in `<main>' An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue. Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
The issues you are facing are specific to OSX Mavericks and the latest version(s) of XCode (as of today, May/21/2014). I'm also on 10.9.2, and I faced the following issues, which are what you're facing too, I believe. Here are the issues I faced while trying to install/build Ruby gems that involve compiling native code and/or some dependencies that do: You get something like Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. somewhere in your output. Reason: the ubiquitus Command Line Tools are not installed on your system. Solution: There are 3 ways to install the Command Line Tools: 1) installing the full XCode suite, starting it, and letting it install the Command Line Tools for you, 2) running xcode-select --install, which will pop up a dialog asking you if you want to install the full XCode, install only the Command Line Tools, or Cancel. This second approach is what I did and it worked for me once, but I've seen it fail on other machines, since apparently the location where it looks for the package online is sometimes accessible, sometimes not, so try this if you want, but it may not work, and, finally 3) downloading it from the web at the Apple Developer Tools page (login with Apple account required) You get something like clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future] somewhere in your output. Reason: Recent versions of XCode removed support for unused command line arguments, as the XCode 5.1 release notes mention: Compiler As of Apple LLVM compiler version 5.1 (clang-502) and later, the optimization level -O4 no longer implies link time optimization (LTO). In order to build with LTO explicitly use the -flto option in addition to the optimization level flag. (15633276) The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified. Projects using invalid compiler options will need to be changed to remove those options. To help ease that transition, the compiler will temporarily accept an option to downgrade the error to a warning: -Wno-error=unused-command-line-argument-hard-error-in-future Note: This option will not be supported in the future. To workaround this issue, set the ARCHFLAGS environment variable to downgrade the error to a warning. For example, you can install a Python native extension with: $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install ExtensionName Similarly, you can install a Ruby Gem with: $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install GemName (16214764) Solution: the solution is mentioned on the snippet from the XCode release notes above, and basically implies setting environment variable ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future before running the gem install, like this: export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install <your-desired-gem> ... or, if you need to execute it as sudo, put the above 2 lines in a script and execute it as sudo, or run it as sudo inline like this: sudo bash -c "export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future; gem install <your-desired-gem>;"; Note: the solution above (setting the ARCHFLAGS environment variable) is going to stop working at some point in the future, as indicated in the aforementioned release notes. Hopefully, by that time current Ruby gems will have removed unused command line options from their Makefiles. NB: I used the approach outlined above to successfully install the github-pages Ruby gem in OSX 10.9.2
Once you install from the App Store, find Xcode in your Applications directory and launch it (not from the terminal). It will likely tell you it needs to download a few more things. Let it. You can then go ahead and follow instructions for other software that requires Xcode. If it still doesn't work, it is likely a problem with the installation instructions of the other software. I would contact the maintainer of that software to ask about specifics. Good luck!
gem install ruby-debug19 fails [duplicate]
This question already has answers here: Closed 10 years ago. Possible Duplicate: Debugging in ruby 1.9 I am unable to install ruby-debug19. I tried to follow http://isitruby19.com/linecache19 BUT it didnot help me I also followed the steps in Installing Gems without rvm, as root, with explicit version of ruby that also didnt help ====================================== > root#vm:/# ruby -v ruby > 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] ====================================== > root#vm:/# gem -v > 1.8.10 ====================================== > root#vm:~/# uname -a > Linux vm 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 386 GNU/Linux ====================================== root#vm:~# sudo gem install ruby-debug19 Building native extensions. This could take a while... ERROR: Error installing ruby-debug19: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for vm_core.h... no checking for vm_core.h... no *** 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=/usr/local/bin/ruby --with-ruby-dir --without-ruby-dir --with-ruby-include --without-ruby-include=${ruby-dir}/include --with-ruby-lib --without-ruby-lib=${ruby-dir}/lib /usr/local/lib/ruby/1.9.1/net/http.rb:644:in `initialize': Connection timed out - connect(2) (Errno::ETIMEDOUT) from /usr/local/lib/ruby/1.9.1/net/http.rb:644:in `open' from /usr/local/lib/ruby/1.9.1/net/http.rb:644:in `block in connect' from /usr/local/lib/ruby/1.9.1/timeout.rb:44:in `timeout' from /usr/local/lib/ruby/1.9.1/timeout.rb:89:in `timeout' from /usr/local/lib/ruby/1.9.1/net/http.rb:644:in `connect' from /usr/local/lib/ruby/1.9.1/net/http.rb:637:in `do_start' from /usr/local/lib/ruby/1.9.1/net/http.rb:626:in `start' from /usr/local/lib/ruby/1.9.1/net/http.rb:1168:in `request' from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read' from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect' from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read' from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download' from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core' from /usr/local/lib/ruby/1.9.1/tempfile.rb:320:in `open' from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core' from extconf.rb:19:in `<main>' Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/linecache19-0.5.12 for inspection. Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out Installing ruby-debug19 locally I got the answer to the question from above link which worked basically put all *.h *.c *.inc files into below folder ruby -rmkmf -e 'puts Config::CONFIG["rubyhdrdir"] + "/" + "ruby-" + RUBY_VERSION.to_s + "-p" + RUBY_PATCHLEVEL.to_s' But i am not happy with this soultion. If i ask a customer to install ruby i can hardly expect to sell this particular solution to the problem. So is there a way to avoid this copying? Can someone please help me. Thanks Su
You don't say what OS you are running, but I had a similar problem a while back with my OSX Lion install. The error was for a different gem, but the error was the same. It turned out to be some sort of XCode version conflict. See my solution here. If that doesn't help, then check out the mkmf.log file. It might contain clues to the answers you are looking for.