Installing native Ruby extensions on Windows for Jekyll
There is a confusion with the instructions you're following. The instructions at RubyInstaller DevKit were created to support installation of extensions using RubyInstaller compiled versions of Ruby.
It is clear, from your current directory (visual studio) and the output of the gem installation you're using mswin32
based Ruby, which will not work with RubyInstaller or the DevKit we documented.
Please install Ruby and the DevKit from RubyInstaller website and follow the instructions there and avoid mixing with Visual Studio
Error installing jekyll: ERROR: Failed to build gem native extension
Although they made the Ruby+DevKit an "optional" download for the RubyInstaller on Windows, if you plan to install gems, it is practically a necessity. A large percentage of the most popular gems are C extension that will need built on your machine when being installed.
The DevKit is a handy toolchain that supplies everything you need for this to be done, automatically without you needed to do anything more than type gem install XXXXX
. Without it, you either cannot use C extension gems, or must have already installed MSYS
and MingW
, have them configured properly, which is all not a user-friendly experience, even for those who familiar with the process.
So even if DevKit is optional, it is still required to make the most of Ruby on Windows.
Error Installing Jekyll - Native Extension Build
Your problem is that either you system doesn't know where make is located at or you don't have it installed. The easiest way to fix this (and probably other issues you'll run into trying to get a ruby system up and running) is to install xcode.
You can get it at http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 for lion. Or it came on a CD with your computer for earlier versions.
If you're using Lion, please see comments below for a link to how to install developer tools on Lion.
Failing to install Jekyll gem native extension on Windows with multiple target patterns
Ok just a try. The Makefile on this line (and following) defines the target for .m.o.
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
Everything looks ok if you're using mingw / cygwin, but INCFLAGS can make problems on window machines, if you've installed ruby in a directory with spaces.
INCFLAG is defined as INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
and if you see my definition below there is no space in any path.
topdir = /C/Ruby200-x64/include/ruby-2.0.0
hdrdir = $(topdir)
arch_hdrdir = C:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32
If I change the ruby installation to a path with spaces I get invalid option error in native windows command line and in the mingw session. Maybe this is could help.
Related Topics
In Ruby What Is the Meaning of Colon After Identifier in a Hash
How to Do a Left Outer Join Using Rails Activerecord
Why Do I Get "Including Capybara::Dsl in the Global Scope Is Not Recommended!"
How to Find a Memory Leak on Heroku
Differences Between Literals and Constructors? ([] VS Array.New and {} VS Hash.New)
How to Create a Symbol from a String That Has Whitespaces
Iterate an Array, N Items at a Time
Initializing Instance Variables in Mixins
Capistrano 3 + Sprockets 3 + Rails 4.2.1 Won't Deploy
How to Access the Base Namespace in Ruby
How to Calculate 32 Bit Crc in Ruby on Rails
Changing Value of Ruby Variables/References
What's the Cleanest Way to Override Activerecord's Find for Both Models and Collections