I can't seem to install kgio with my app, every time I do bundle install. I get this error ! Can anyone help me? I have tried re bundling like 5 times already.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for CLOCK_MONOTONIC in time.h... no
checking for CLOCK_MONOTONIC() in time.h... no
checking for clockid_t in time.h... no
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** 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
--with-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
Actually, the answer is that you can't use kgio with windows. I spent 3 hours sweating through the other answer here before finding that out. Kgio needs a unix-like environment according to it's developer.
You are probably missing required libraries.
Also from RubyInstaller Wiki
This failure is due to the native gem compile/install process using a version of libiconv-2.dll other than the one integrated into the DevKit due to how Windows searches for DLLs
This can be worked around by searching your computer for the file libiconv-2.dll and renaming, deleting, or otherwise moving any found instances out of the way and re-running the native gem install process or in your case Bundle Install
It is recommended that if you don’t know why or what put the libiconv-2.dll file in the directory in which you found it, that you move it back after you compile whatever gems you need. This will possibly prevent other applications from breaking.
EDIT:
The kgio gem only builds and runs on Unix like systems (http://bogomips.org/kgio/) It uses functions which are not natively available on Windows.
If you are trying to use Unicorn, then you just need to replace the webserver.
Give Thin a try. Add the following lines to your Gemfile:
gem 'thin'
Related
I am not so into Ruby and I have the following problem trying to install Redmine (that is developed in Ruby) on my Ubuntu 16.04 server on which I have installed MariaDB instead MySql
I am following this official guide: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step
So, considering the previous tutorial, I followed all the installation points excepet this one:
sudo apt-get install mysql-server mysql-client
because I don't want install MySql Server because I have just installed and I am just using MarriaDB on this server.
My installation problem appear when I perform this statment to install the gem bundler:
sudo gem update
Infact I am obtaining these error messages that seems to be related to a missing MySql installation (or I think so...correct me if I am doing wrong assertion):
root#Betrivius-VPS:~# sudo gem update
Updating installed gems
Updating mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/mysql2-0.4.5/ext/mysql2
/usr/bin/ruby2.3 -r ./siteconf20161115-17323-1dd1r35.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for rb_big_cmp()... yes
checking for mysql_query() in -lmysqlclient... no
-----
mysql client is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again.
-----
*** 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/bin/$(RUBY_BASE_NAME)2.3
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/mysql2-0.4.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/mysql2-0.4.5 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/mysql2-0.4.5/gem_make.out
Gems updated: mysql2
So, my first doubt is if the entire installation fails or only some part?
As you can see it is failing on something that is related to MySql (I think the installation of MySql Server and the bash MySql client).
The problem is that I have not to use MySql but I have to use MariaDB and I can't change it.
Reading the previous error output it say that further information are into this file: /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/mysql2-0.4.5/, this is its content:
current directory: /var/lib/gems/2.3.0/gems/mysql2-0.4.5/ext/mysql2
/usr/bin/ruby2.3 -r ./siteconf20161115-17488-ql00no.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for rb_big_cmp()... yes
checking for mysql_query() in -lmysqlclient... no
-----
mysql client is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again.
-----
*** 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/bin/$(RUBY_BASE_NAME)2.3
--with-mysql-dir
From what I have understand reading online this gem_make.out file should contains the error during the compilation (or something like this). It seems to me that it only say that it is missing the mysql client.
How can I avoid to install MySql and use my MariaDB installation?
MariaDB is a binary drop-in reclacement for MySQL, as you may see here. It even runs on the same port and a common user, using no advanced features, won't even notice if MySQL is replaced sudeenly by MariaDB. There are a few incompatibilities, but it will require a bit of effort to face one of them in common use.
In most Linux distribuitions, including those who addopted MariaDB as standard, like Slackware, the build headers are still in "MySQL-way".
Then, all you need to do is keep you MariaDB server installed and running. Then install libmysqlclient-dev an do you bundle install. Everything will be fine. I've done this lots of times.
I don't know what is your Rails version, but consider upgrading to Rails 5 if you face some of the incompatibilities. It seems Rails five offers support for MariaDB, as it says here. But I never used this support and just can't tell you anything about it, unfortunately.
Im new to ruby and rails. I've set up ruby 2 on rails 4 successfully (On windows 7). I cloned a ruby on rails based git project (thingspeak - https://github.com/iobridge/thingspeak/blob/master/README.textile). Using the command line I went into the project directory and ran "bundle install". A few bundles got downloaded and installed and then I got the following error -
::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
c:/row/Ruby200/bin/ruby.exe extconf.rb
checking for CLOCK_MONOTONIC in time.h... yes
checking for clockid_t in time.h... yes
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** 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:/row/Ruby200/bin/ruby
--with-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
Gem files will remain installed in c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-
2.8.1 for inspection.
Results logged to c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-2.8.1/ext/kgio/ge
m_make.out
An error occurred while installing kgio (2.8.1), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.8.1'` succeeds before bundling.
Any ideas on what it means and how to fix it?
The kgio gem which fails to compile here does not work on Windows. It could work if you comment the respective line in the Gemfile but could fail in various other places.
Generally, the Rails app you want to install doesn't seem to be tested on Windows at all, so you might instead want to use a better supported OS to install it. The README mentions Ubuntu here.
First of all thank you for your time.
I've been having some trouble installing libxml-ruby on my windows 8 OS. I have ruby installed and want to use libxml specifically to modify xmls because other members of my team have already started with libxml. The problem is that they were using linux and I'm on windows. I could try to put everything on a vm but I don't think I should need to.
They had issues installing on linux too but their solution and problem was different from mine.
C:\dev\school\ece450\MyBPM>gem install libxml-ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... yes
checking for inflate() in -lz... no
checking for inflate() in -lzlib... no
checking for inflate() in -lzlib1... no
checking for inflate() in -llibz... 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:/Ruby200/bin/ruby
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/
--with-socketlib
--without-socketlib
--with-nsllib
--without-nsllib
--with-mlib
--without-mlib
--with-zlib
--without-zlib
--with-zliblib
--without-zliblib
--with-zlib1lib
--without-zlib1lib
--with-libzlib
--without-libzlib
extconf failure: need zlib
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/libxml-ru
by-2.7.0 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/li
bxml-ruby-2.7.0/gem_make.out
I have tried installing zlib (binaries) and pointing to the zlib binary.
That didn't really help.
So now I'm googling :)
Alright, I finally got sick of running into this issue myself (and eventually giving up and moving to a VM). So I spent some time fiddling around and finally got a reliable way to get install Ruby (2.2.3 as of now) and libxml-ruby on Windows.
Download and install the latest Ruby for your architecture from rubyinstaller.org
Download the matching DevKit from the same page
Extract the DevKit and follow the setup instructions, particularly step 4
Copy zlib1.dll from <ruby_install_dir>/bin to <ruby_install_dir>/lib
Download the MinGW iconv package and extract everything in mingw64/lib to <ruby_install_dir>/lib
Download libxml for windows (see below). Extract the contents of its lib into your <ruby_install_dir>/lib and the contents of its include directory into <ruby_install_dir>/include
With luck, gem install libxml-ruby should now work, but odds are you'll probably have to try some different arguments to the installer. Ultimately I needed gem install libxml-ruby -- with-xml2-include=C:\Ruby22-x64\include\libxml2 --with-iconv-include=C:\Ruby22-x64\include
Since StackOverflow only lets me post two links in an answer;
I found a 64 bit version of libxml for windows at
https://forge.imag.fr/frs/?group_id=184&release_id=320
Another possibility is
ftp://ftp.zlatkovic.com/libxml/64bit/
but neither seem to be an official source, so no guarantees that it'll be around when you read this ;)
Nevermind.
I went on a journey through the internet and decided just to use a VM and run ruby on linux. Yay 1 hour setup....
Here's where my journey ended
http://rubyonwindowsguides.github.io/book/ch02-05.html
Thanks for reading.
I've downloaded a rails open source webapp , and while i was starting it using :
C:\Users\admin\Downloads\iCare\icare-develop>rails server
←[31mCould not find kgio-2.8.0 in any of the sources←[0m
←[33mRun `bundle install` to install missing gems.←[0m
i tried to fix this error using:
cmd:>gem install kgio -v '2.8.0'
i got the error:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing kgio:
ERROR: Failed to build gem native extension.C:/Ruby193/bin/ruby.exe extconf.rb
checking for CLOCK_MONOTONIC in time.h... no
checking for CLOCK_MONOTONIC() in time.h... no
checking for clockid_t in time.h... no
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** 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.
and
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-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
and
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/kgio-2.8.
0 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/kgio-2.8.0/ext/kgio/gem_ma
ke.out
i did type:bundle install after, but nothing happened..
kgio is only for *nix system.
the kgio gem page:
kgio 2.8.0 kgio provides non-blocking I/O methods for Ruby without
raising exceptions on EAGAIN and EINPROGRESS. It is intended for use
with the Unicorn and Rainbows! Rack servers, but may be used by other
applications (that run on Unix-like platforms).
Try this
platforms :ruby do # linux
gem 'unicorn'
end
platforms :mswin do
# gems specific to windows
end
Source:
Develop on windows, run unicorn in production on heroku
I think you're using windows operating system , so only thing you need to get ride of this error is to comment in or remove the gem 'unicorn' in you gem file as this is only for linux systems
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.