I have a Puppet manifest that installs the Zurb Foundation gem:
class compass {
package { ["rubygems"]:
ensure => 'installed'
}
package { ['zurb-foundation']:
ensure => '3.0.6',
provider => 'gem',
require => Package['rubygems']
}
}
This causes the following error when running puppet apply:
err: /Stage[main]/Compass/Package[zurb-foundation]/ensure: change from absent to 3.0.6 failed: Could not update: Execution of '/usr/bin/gem install -v 3.0.6 --include-dependencies --no-rdoc --no-ri zurb-foundation' returned 1: INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
ERROR: Error installing zurb-foundation:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:4:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.0 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.0/ext/ffi_c/gem_make.out
at /etc/puppet/manifests/classes/compass.pp:25
However, doing a gem list yields the following results:
# gem list
*** LOCAL GEMS ***
chunky_png (1.2.8)
compass (0.12.2)
fssm (0.2.10)
rake (10.1.0)
rb-fsevent (0.9.3)
sass (3.2.0.alpha.277)
zurb-foundation (3.0.6)
The error causes puppet apply to not complete properly, since a lot of items are skipped because of failed dependencies. What can I do?
I think that the problem is that you don't have the ruby dev kit installed for you ruby (that's what's used to build native extensions).
You'll want to add something like (it may be different depending on your version of ruby):
package { 'ruby-dev':
ensure => installed,
before => Package['zurb-foundation'],
}
This should allow the gem to be built properly and let your puppet run finish too.
Related
I am attempting to use SQLite within an AWS Lambda Ruby function, but having trouble with the sqlite3 gem. Has anyone been able to do this successfully?
I have a simple Gemfile:
source "https://rubygems.org"
gem "activerecord", "~> 7.0"
gem "sqlite3", "~> 1.4"
After a few false starts trying to run the function on Lambda itself, I looked at this question on Ruby gems with native extensions on AWS Lambda, so am trying to package dependencies using a Lambda-like Docker image. bundle install fails at the sqlite3 native extension step. When I try to install the gem by itself:
docker run --rm -v "$PWD":/var/task lambci/lambda:build-ruby2.7 gem install sqlite3
I see:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /var/runtime/gems/sqlite3-1.4.2/ext/sqlite3
/var/lang/bin/ruby -I /var/lang/lib/ruby/site_ruby/2.7.0 -r ./siteconf20220430-1-n5ip9q.rb extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'brew install sqlite3',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
and check your shared library search path (the
location where your sqlite3 shared library is located).
The docs for the Docker image seem to indicate that sqlite-devel has been installed, though. When I ask which -a sqlite3, it says:
/usr/bin/sqlite3
/bin/sqlite3
When I try to build --with-sqlite3-dir=/bin/sqlite3 or --with-sqlite3-dir=/usr/bin/sqlite3:
Building native extensions with: '--with-sqlite3-dir=/bin/sqlite3'
This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /var/runtime/gems/sqlite3-1.4.2/ext/sqlite3
/var/lang/bin/ruby -I /var/lang/lib/ruby/site_ruby/2.7.0 -r ./siteconf20220430-1-1rgbak9.rb extconf.rb --with-sqlite3-dir\=/bin/sqlite3
checking for sqlite3.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
--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=/var/lang/bin/$(RUBY_BASE_NAME)
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
/var/lang/lib/ruby/2.7.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /var/lang/lib/ruby/2.7.0/mkmf.rb:613:in `try_cpp'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:1177:in `block in find_header'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:971:in `block in checking_for'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:361:in `block in postpone'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:357:in `postpone'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:970:in `checking_for'
from /var/lang/lib/ruby/2.7.0/mkmf.rb:1176:in `find_header'
from extconf.rb:68:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/runtime/extensions/x86_64-linux/2.7.0/sqlite3-1.4.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/runtime/gems/sqlite3-1.4.2 for inspection.
Results logged to /var/runtime/extensions/x86_64-linux/2.7.0/sqlite3-1.4.2/gem_make.out
This is where I am stuck. I note the message:
/var/lang/lib/ruby/2.7.0/mkmf.rb:471:in 'try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
But not sure how to make headway on that. I'm also pretty new to Docker and have been having trouble trying to read mkmf.log; I am getting No such file or directory when I try to cat it.
I found some questions/answers that indicate people have gotten SQLite working with Node and Python Lambda functions, but I don't see any discussion of Ruby functions. I also found this layer for adding SQLite support in Python functions. But didn't find any such layer for Ruby.
Is a Ruby layer necessary, or is there something else I am missing? Thanks very much!
Landing on an existing Rails project, I encounter some difficulty with setting up the environment, which makes pop up the infamous "dependency hell" in my head. It seems limited to mini_racer 0.2.4 though.
Here is how it goes:
bundle install
# […] lot of working stuffs
Fetching libv8 6.7.288.46.1 (x86_64-linux)
Installing libv8 6.7.288.46.1 (x86_64-linux)
# […] more working stuffs
Fetching mini_racer 0.2.4
Installing mini_racer 0.2.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/psychoslave/.rvm/gems/ruby-2.5.1#the_project/gems/mini_racer-0.2.4/ext/mini_racer_extension
/home/psychoslave/.rvm/rubies/ruby-2.5.1/bin/ruby -I /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20200404-68221-1tr6jr3.rb extconf.rb
checking for -lpthread... yes
creating Makefile
current directory: /home/psychoslave/.rvm/gems/ruby-2.5.1#the_project/gems/mini_racer-0.2.4/ext/mini_racer_extension
make "DESTDIR=" clean
current directory: /home/psychoslave/.rvm/gems/ruby-2.5.1#the_project/gems/mini_racer-0.2.4/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
cc1plus: warning: command line option '-Wimplicit-int' is valid for C/ObjC but not for C++
mini_racer_extension.cc: In function 'void prepare_result(v8::MaybeLocal<v8::Value>, v8::TryCatch&, v8::Isolate*, v8::Local<v8::Context>, EvalResult&)':
mini_racer_extension.cc:234:73: error: no matching function for call to 'v8::Value::ToObject()'
234 | String::NewFromUtf8(isolate, "JSON"))->ToObject();
| ^
In file included from mini_racer_extension.cc:4:
/home/psychoslave/.rvm/gems/ruby-2.5.1#the_project/gems/libv8-7.3.492.27.1-x86_64-linux/vendor/v8/include/v8.h:2390:44: note: candidate: 'v8::MaybeLocal<v8::Object>
v8::Value::ToObject(v8::Local<v8::Context>) const'
2390 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
| ^~~~~~~~
[…]
[A lot of other compiling errors]
[…]
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-self-assign'
cc1plus: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1plus: warning: unrecognized command line option '-Wno-parentheses-equality'
make: *** [Makefile:210: mini_racer_extension.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/psychoslave/.rvm/gems/ruby-2.5.1#the_project/gems/mini_racer-0.2.4 for inspection.
Results logged to /home/psychoslave/.rvm/gems/ruby-2.5.1#the_project/extensions/x86_64-linux/2.5.0/mini_racer-0.2.4/gem_make.out
An error occurred while installing mini_racer (0.2.4), and Bundler cannot continue.
Make sure that `gem install mini_racer -v '0.2.4' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
mini_racer
Browsing the web, one can easily find mini-racer failing to compile · Issue #4 · jules2689/extended_bundler-errors leading to Add mini_racer handling. From this I tried gem uninstall libv8 && gem install mini_racer -v '0.2.4' --source 'https://rubygems.org/ but it fails to compile just as above.
Now, running bundle update && bundle install works like a charm, so I thought I might just go with this for now and see with the rest of the team if we might update at least the mini-racer gem. Then I started to complete the README.md to add some details and wanted to commit in a new branch and ask review. But it happens that the team use overcommit to add some git hooks which are crashing as it includes Brakeman which depends on mini_racer-0.2.4:
git commit -m"Add more detailed procedure on how to install on Fedora 31"
Running pre-commit hooks
Analyze with RailsBestPractices..................[RailsBestPractices] OK
Check for vulnerable versions of gems...................[BundleAudit] WARNING
Run Brakeman...............................................[Brakeman] FAILED
/home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:91:in `block in materialize': Could not find mini_racer-0.2.4 in any of the sources (Bundler::GemNotFound)
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:in `map!'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:in `materialize'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:170:in `specs'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:237:in `specs_for'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:226:in `requested_specs'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:108:in `block in definition_method'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:20:in `setup'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler.rb:107:in `setup'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/bundler/setup.rb:20:in `<top (required)>'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/psychoslave/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
Run YarnLint...............................................[YarnLint] OK
✗ One or more pre-commit hooks failed
Summary of the development platform:
Fedora 31 with an out of the box GCC 9.3.1 20200317 (Red Hat 9.3.1-1)
RVM 1.29.10
Bundler version 1.17.3
Ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
Rails 5.2.2
PATH: /home/psychoslave/.rvm/gems/ruby-2.5.1#the_project/bin:/home/psychoslave/.rvm/gems/ruby-2.5.1#global/bin:/home/psychoslave/.rvm/rubies/ruby-2.5.1/bin:/home/psychoslave/.local/bin:/home/psychoslave/.local/bin:/home/psychoslave/bin:/home/psychoslave/.local/bin:/home/psychoslave/.config/nvm/versions/node/v8.12.0/bin:/home/psychoslave/.local/bin:/home/psychoslave/.local/bin:/home/psychoslave/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/psychoslave/.rvm/bin
LIBRARY_PATH, CPATH, C_INCLUDE_PATH, CPLUS_INCLUDE_PATH are empty
What steps would you recommand to solve this depency issue?
For what it worths, our team simply runned bundle update mini_racer, and everything works now. Of course, it still doesn't make mini_racer 0.2.4 compiles on Fedora 31.
I've spent the past hour scouring the internet for any solution to this but so far have come up empty handed...
I'm trying to install a gem called taglib-ruby, which has a dependency on a c++ compiler (which one would assume is covered by gcc and Xcode Commandline Tools) and taglib (a C++ library) which I have installed using homebrew. However, it doesn't seem to get as far as trying to include that, because it fails to find lstdc++.
I'm trying to do this on OSX El Capitan (10.11).
Can someone tell me what this dependency is and how I install it?
Please see console output below:
$ gem install taglib-ruby
Building native extensions. This could take a while...
ERROR: Error installing taglib-ruby:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby -r ./siteconf20160618-66149-xswlyl.rb extconf.rb
checking for main() in -lstdc++... *** 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=/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-tag-dir
--without-tag-dir
--with-tag-include
--without-tag-include=${tag-dir}/include
--with-tag-lib
--without-tag-lib=${tag-dir}/lib
--with-stdc++lib
--without-stdc++lib
/usr/local/rvm/rubies/ruby-1.9.3-p194/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 /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:845:in `block in have_library'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:840:in `have_library'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/taglib-ruby-0.7.1/ext/extconf_common.rb:28:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from extconf.rb:2:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/taglib-ruby-0.7.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/extensions/x86_64-darwin-11/1.9.1/taglib-ruby-0.7.1/gem_make.out
The error message has this in it:
/usr/local/rvm/rubies/ruby-1.9.3-p194/
That's a pretty old version of ruby. Use rvm to install a recent version of ruby:
$ rvm install 2.3.1
then try installing the gem again.
If you want to make that version of ruby the default when you open Terminal:
$ rvm --default use 2.3.1
Edit: Hmmm...on OSX 10.10.5, I was able to do $ brew install taglib and then successfully install the gem $ gem install taglib-ruby on both ruby-1.9.3-p194 and ruby-2.3.0. I have the full Xcode installed(Xcode 7.2.1). I wonder if your Xcode command line tools are as severely outdated as your ruby version? You can try:
$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
to get the version of your Xcode command line tools.
You might need to update rvm, ruby, homebrew, and the Xcode command line tools.
I have switched to ruby 2.0.0, rails 4 from rails 3, when i run the command bundle update rails i get this error
An error occurred while installing ruby-debug-base19 (0.11.25), and Bundler cannot continue.
Make sure that `gem install ruby-debug-base19 -v '0.11.25'` succeeds before bundling.
But when run gem install ruby-debug-base19 -v '0.11.25' i got that error:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base19:
ERROR: Failed to build gem native extension.
/home/sunloverz/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
/home/sunloverz/.rvm/gems/ruby-2.0.0-p247#rails-4.0/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core': Use RbConfig instead of obsolete and deprecated Config.
/home/sunloverz/.rvm/gems/ruby-2.0.0-p247#rails-4.0/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core': Use RbConfig instead of obsolete and deprecated Config.
checking for rb_method_entry_t.body in method.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=/home/sunloverz/.rvm/rubies/ruby-2.0.0-p247/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}/
/home/sunloverz/.rvm/gems/ruby-2.0.0-p247#rails-4.0/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:268:in `block (2 levels) in read': Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar.gz and all I got was a 404! (URI::NotFoundError)
Substitute ruby-debug-base19 in your Gemfile with a Ruby 2.0 compatible debugger such as byebug and run the command again.
curb gem fails to install.
I am using following configuration:-
Windows 7
Ruby 2
Rails 4
gem "bundler 1.3.5"
C:\RorProjects>gem install curb
Building native extensions. This could take a while...
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
C:\Users\abc>gem install curb
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while.....
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
C:/Rubyinstaller200/bin/ruby.exe extconf.rb
checking for curl-config... no
checking for main() in -lcurl... 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=C:/Rubyinstaller200/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/
--with-curllib
--without-curllib
extconf.rb:18:in `<main>': Can't find libcurl or curl/curl.h (RuntimeError)
Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
options to extconf.
Gem files will remain installed in C:/Rubyinstaller200/lib/ruby/gems/2.0.0/gems/
curb-0.8.4 for inspection.
Results logged to C:/Rubyinstaller200/lib/ruby/gems/2.0.0/gems/curb-0.8.4/ext/ge
m_make.out
Try installing mingw and run the command within it, I haven'T worked on windows for a while but it used to fix my gem install problems back then :
http://www.mingw.org/
You have to specify the paths to header files and the static library in order to build the extensions. First make sure you have the ruby devkit installed. Then download the x86 package (suffixed 'devel', it's the one that includes all the stuff), extract it somewhere and try gem install curb -- --with-curl-lib=c:/path/to/curl/lib --with-curl-include=c:/path/to/curl/include.
If this one doesn't work (for me it didn't when I tried to install curb with libcurl 7.32.0 and ruby 2.0), you can try downloading the x86 libcurl package here, follow the instruction in the first post to extract it, set up the environment and then run gem install curb -- -with-opt-dir=c:/path/to/libcurl. This got me curb 0.8.5 at the time of this post.