Problem installing LibCurl + LibXML + FeedZirra on Windows XP - ruby-on-rails

I am rails newbie. I am working on Windows XP.
I have this version of ruby.
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
I have Rails 2.3.8 installed.
I am trying to install feedzirra trying every possible way after watching the Rails Cast 168.
First I tried to install using gem install pauldix-feedzirra. I got this error.
C:\Ruby>gem install pauldix-feedzirra
Building native extensions. This could take a while...
ERROR: Error installing pauldix-feedzirra:
ERROR: Failed to build gem native extension.
C:/Ruby/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:/Ruby/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}/lib
--with-curllib
--without-curllib
extconf.rb:12: 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:/Ruby/lib/ruby/gems/1.8/gems/taf2-curb-0.5.
4.0 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/ext/gem_make.
out
Next I tried gem install curb. I found this on PaulDix FeedZirra page where he had suggested us that Todd Fisher is working on Ruby binding of libcurl which is called curb
Now, I am getting this error
C:\Ruby>gem install curb
Building native extensions. This could take a while...
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
"-g -O2 -DFD_SETSIZE=256 $(cflags)"
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:/Ruby/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}/lib
--with-curllib
--without-curllib
extconf.rb:19: 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:/Ruby/lib/ruby/gems/1.8/gems/curb-0.7.8 for
inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/curb-0.7.8/ext/gem_make.out
When the error said its because it cant find libcurl or curl/curl.h then I did some googling about it and I found link to Download Wizard. The best option for a rails newbie is to go with curl executable (as suggested ascross various forums and articles) I did that. Extracted the file. Installed the exe file. Now I thought the libcurl problem is solved. But??
Ok, now inorder to install feedzirra, i need to install libxml too. So with a little bit of googling i ended up here at Libxml ruby forge, downloaded the libxml-ruby-1.1.3 gem and placed it in C:\Ruby\bin folder.
Now, thinking that all set, I am ready to go to learn feed parsing, i enter gem install pauldix-feedzirra. I get the same error "Can't find libcurl or curl/curl.h" and the same old list what i got earlier.
For the past 3 days, I am just trying to install this. No luck!
Could someone help me fix this? Basic steps. Please think I dont know how to operate windows. Please go to that basic level when you talk problem fixing terminology and help me to fix this problem.
Looking forward for your help and support in a big way.
Thanks in advance.

Curb Installed
Follow instrictions of rubyinstaller and sakaiproject
You would be able to install curb in no time!

yes, curb she will be install in no time. but not taf2-curb. and taf2-curb - this one need for feedzirra. Look on my fighting with taf2-curb, it wouldnt compile in windows for reason.
BTW, i switched to feedtosis, had some active support issues with feedzirra on edge, do not have time to resolve it.

Related

Can't find libcurl or curl/curl.h while installing 'elance' gem on windows

I have facing some problem with curl and curb on windows.
working on following environment :
ruby 1.9.3
rails 4.0.3
and added 'elance' gem with gemfile but after added this gem got following error. i need a solution for window environment.
Error details :
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
c:/Ruby193/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:/Ruby193/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}/lib
--with-curllib
--without-curllib
extconf.rb:23:in `<main>': Can't find libcurl or curl/curl.h (RuntimeError)
An error occurred while installing curb (0.8.5), and Bundler cannot continue.
Make sure that `gem install curb -v '0.8.5'` succeeds before bundling.
I am stuck here with this error. can you please any one can resolve and help me out with windows.
Download and install cURL for Windows on the cURL download page - Win32 section. The ZIP-file contains a curl.exe that you can run and it is the required dependancy that you need.

"extconf.rb failed" message while installing Rails

Newbie here. I've searched for other similar questions on the site but still wasn't able to solve the problem. I've installed Ruby 2.0.0 and RubyGem 2.0.3, but when I'm trying to install Rails 4.0.0 I got:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
*** 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=/Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
--with-atomic_reference-dir
--without-atomic_reference-dir
--with-atomic_reference-include
--without-atomic_reference-include=${atomic_reference-dir}/include
--with-atomic_reference-lib
--without-atomic_reference-lib=${atomic_reference-dir}/
/Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:516:in `try_link0'
from /Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:814:in `try_run'
from extconf.rb:22:in `<main>'
Gem files will remain installed in /Users/yuanhunglo/.rvm/gems/ruby-2.0.0-p0/gems/atomic-1.1.10 for inspection.
Results logged to /Users/yuanhunglo/.rvm/gems/ruby-2.0.0-p0/gems/atomic-1.1.10/ext/gem_make.out
I tried to install Rails by
gem install rails --version 4.0.0
I'm not sure if there's something wrong with the set up or if I still need to install something. Thanks in advance for your help.
It seems you're using OSX.
This error happens when you can't compile some extensions, in this case due to the lack of a compiler ("You have to install development tools first"). Open App Store, download XCode and, after installing it, click on "XCode" on the menu, go to Preferences -> Downloads -> Components and download "Command Line Tools".

Unable to get ImageMagick version *** extconf.rb failed ***

i've googled this error a couple of times and got instructions to install rMagick win-32 from their website. However the win32 versions looks depecrated and is made for Ruby 1.8.6 as for i have 1.9.3.
Can someone please help me install this gem? I really can't be arsed to do the imageMagick installing on my PC for this since the code will be moved to other PC's etc. a couple of times in the next few weeks (school assignment, you know how i goes). And with that it appears that imageMagick CAN be installed along with this gem(Which is by far the best option in my case). Nonetheless, i can't figure out this error since i'm a pretty big n00b when it comes to these things.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
Ongeldige stationsspecificatie.
Unable to get ImageMagick version
*** 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:/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/rmagick-2.13.1 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2
.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
Here I faced the same problem. After search, I found solution from here
http://www.waydotnet.com/2010/02/12/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/
http://phosphor-escence.blogspot.in/2010/12/if-you-fail-install-rmagick-on-mingw.html
You need to install dev packages:
sudo apt-get install libmagick++-dev
Hope this helps :)

Installing libv8 for ree on Mountain Lion fails

I've been trying to find a solution to this for a few days now and no luck. If anyone has been successful installing the libv8 gem for REE 1.8.7 on ML, could you please let me know the process you followed?
I have both the XCode LLVM compiler as well as the kennethreitz GCC package for 10.7+ v2 installed.
The output when trying to install with native extensions is:
Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
/Users/XXXXX/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb
*** 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=/Users/XXXXX/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby
extconf.rb:13: uninitialized constant Gem (NameError)
Checking for Python...
Gem files will remain installed in /Users/XXXXX/.rvm/gems/ree-1.8.7-2012.02/gems/libv8-3.3.10.4 for inspection.
Results logged to /Users/XXXXX/.rvm/gems/ree-1.8.7-2012.02/gems/libv8-3.3.10.4/ext/libv8/gem_make.out
(The results logged are the exact same as the error).
This worked for me.
RUBYOPT=-rrubygems gem install therubyracer
I was able to successfully install the libv8 gem on Mountain Lion on a freshly installed ree-1.8.7. I believe the issue you're seeing stems from the GCC version being used.
As is now described in the osx-gcc-installer's README you should switch from Kenneth Reitz's LLVM-version of GCC to the GCC 4.2 that is available via Homebrew or Macports.
Homebrew instructions:
http://coderwall.com/p/dtbuqg
MacPorts instructions:
http://coderwall.com/p/pagj2w
Note that you will want to set the CC path and establish the necessary symlink as described in those articles.

How do you get libcurl libraries to work with InstantRails?

I'm working on a windows machine and trying to get the curb plugin to work, first thing I realized was I needed the curl library installed on my machine, so that's what I'm looking to do.
I simply downloaded a curl library, a curllib library, and have them located at c:/curl and c:/curllib respectively. I setup my environmental variables, I can execute curl.exe and that works like a beaut. However, my gem still fails with the following.
C:/InstantRails/ruby/bin/ruby.exe extconf.rb install curb
checking for curl-config... no
checking for main() in curl.lib... 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
--srcdir=.
--curdir
--ruby=C:/InstantRails/ruby/bin/ruby
--with-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
--with-curllib
--without-curllib
extconf.rb:9: 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:/InstantRails/ruby/lib/ruby/gems/1.8/gems/curb-0.4.4.0 for inspection.
Results logged to C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/curb-0.4.4.0/ext/gem_make.out
Anybody have any ideas?
This ends up to be the best tutorial to get the job done.
http://www.opiumtrail.com/wiki/CurbForWindows/
Things to note:
I compiled using MSVC6, so the
additional steps he had explained for
using a different version didn't
apply.
I had to use the exact gem and libcurl specified on his tutorial
You can probably accomplish what you need using the included HTTP:NET library, in my case I couldn't figure it out using that library.

Resources