I'm trying to install prebuilt binary of pg gem on windows (I don't want devkit):
>ruby -v
ruby 2.1.4p265 (2014-10-27 revision 48166) [x64-mingw32]
>gem install pg
Fetching: pg-0.17.1.gem (100%)
ERROR: Error installing pg:
The 'pg' native gem requires installed build tools.
>gem install pg -v 0.17.1 --platform=x64-mingw32
ERROR: Error installing pg:
The 'pg' native gem requires installed build tools.
even though the binary gem is published at https://rubygems.org/gems/pg/versions/0.17.1-x64-mingw32
What am I doing wrong ?
Same thing happens with 32-bit ruby.
So it turns out the gem was prebuilt for ruby 2.0.x which is not ABI compatible with ruby 2.1.x that I'm using. The error message could be more clear about that :(
Switched to the latest pre-release that contains needed binary and everything is fine now.
Related
See also here
While doing gem install mechanize I'm getting the following error:
ERROR: Error installing mechanize:
nokogiri requires Ruby version < 2.3, >= 1.9.2.
However, before you chalk this up as me being an idiot and not knowing what I'm doing, if I run nokogiri -v, I get this:
# Nokogiri (1.6.8.rc3)
---
warnings: []
nokogiri: 1.6.8.rc3
ruby:
version: 2.3.0
platform: i386-mingw32
description: ruby 2.3.0p0 (2015-12-25 revision 53290) [i386-mingw32]
engine: ruby
libxml:
binding: extension
source: packaged
libxml2_path: "/home/flavorjones/code/oss/nokogiri/ports/i686-w64-mingw32/libxml
2/2.9.3"
libxslt_path: "/home/flavorjones/code/oss/nokogiri/ports/i686-w64-mingw32/libxsl
t/1.1.28"
libxml2_patches: []
libxslt_patches:
- 0001-Adding-doc-update-related-to-1.1.28.patch
- 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
- 0003-Initialize-pseudo-random-number-generator-with-curre.patch
- 0004-EXSLT-function-str-replace-is-broken-as-is.patch
- 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
- 0007-Separate-function-for-predicate-matching-in-patterns.patch
- 0008-Fix-direct-pattern-matching.patch
- 0009-Fix-certain-patterns-with-predicates.patch
- 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
- 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
- 0014-Fix-for-bug-436589.patch
- 0015-Fix-mkdir-for-mingw.patch
- 0016-Fix-for-type-confusion-in-preprocessing-attributes.patch
- 0017-Updated-config.guess.patch
compiled: 2.9.3
loaded: 2.9.3
So it's apparent that nokogiri is installed, because it took me about three hours to install it. Is there a work around so that I can include this version of nokogiri? I'm running Windows 7.
This is for Windows 7 users running Ruby version: ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32] or higher attempting to install the mechanize gem
If you are having issues installing nokogiri and mechanize here's how you do it successfully.
Install nokogiri's previous version first: gem install nokogiri --pre
Your output will look something like this:
Fetching: nokogiri-1.6.8.rc3-x86-mingw32.gem (100%)
Nokogiri is built with the packaged libraries: libxml2-2.9.3, libxslt-1.1.28, zlib-1.2
.8, libiconv-1.14.
Successfully installed nokogiri-1.6.8.rc3-x86-mingw32
Parsing documentation for nokogiri-1.6.8.rc3-x86-mingw32
Installing ri documentation for nokogiri-1.6.8.rc3-x86-mingw32
Done installing documentation for nokogiri after 12 seconds
1 gem installed
After you have it successfully installed, install nokogiri version 1.6: gem install nokogiri -v 1.6
The output will look like this:
Fetching: mini_portile-0.5.3.gem (100%)
Successfully installed mini_portile-0.5.3
Fetching: nokogiri-1.6.0-x86-mingw32.gem (100%)
Successfully installed nokogiri-1.6.0-x86-mingw32
Parsing documentation for mini_portile-0.5.3
Installing ri documentation for mini_portile-0.5.3
Parsing documentation for nokogiri-1.6.0-x86-mingw32
Installing ri documentation for nokogiri-1.6.0-x86-mingw32
Done installing documentation for mini_portile, nokogiri after 9 seconds
2 gems installed
And finally go ahead and install mechanize, IT WILL WORK! gem install mechanize
Finally you will have mechanize installed!
Fetching: mechanize-2.7.4.gem (100%)
Successfully installed mechanize-2.7.4
Parsing documentation for mechanize-2.7.4
Installing ri documentation for mechanize-2.7.4
Done installing documentation for mechanize after 9 seconds
1 gem installed
Notes:
You may be able to bypass the first part, gem install nokogiri --pre it wouldn't allow me to continue until a version of nokogiri was installed already, but I'm not sure if that was just my system or not.
This is the only workaround that I have discovered in order to install mechanize and nokogiri, if you encounter a problem please let me know, so I can find a further solution for the problem.
I am beginner in ruby and wanted to install and GUI toolkit. So i surfed web and found shoes was one toolkit so i downloaded the ".install" file it didn't work saying some permission error, then i downloaded the older version which was ".run" format and that too didn't work so i found a gem of shoes when i try to download i get the below in ruby. i downloaded this shoes from git and still facing some error.
root#Drona:/home/naren/shoes4# gem install bundler && bundle install
Successfully installed bundler-1.10.5
1 gem installed
Installing ri documentation for bundler-1.10.5...
Installing RDoc documentation for bundler-1.10.5...
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all
non-root users on this machine.
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies....
Using rake 10.4.2
Using addressable 2.3.8
Using after_do 0.3.1
Using ast 2.0.0
Using parser 2.2.2.6
Using astrolabe 1.3.0
Using benchmark-ips 2.2.0
Using bouncy-castle-java 1.5.0147
Using docile 1.1.5
Installing json 1.8.3 with native extensions
Gem::Installer::ExtensionBuildError: 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:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
the above is the terminal output.
Ruby version installed is :
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
someone help we out with this installation
and if i have done anything wrong in installation of shoes then let me know
From your terminal directory it seems like you are trying to install shoes4 on ruby 1.9.3. To install shoes4 you need JRuby and a JDK - please follow the instructions in the readme
Shoes 3 can't be installed through gem install due to the way it was built. For Shoes 3 you need the install script, I recommend the appropriate Shoes 3.2 version from this page. If this fails with some error please let us know the error so we can help :)
You should use the gem program to install shoes. If on your command line you type gem install shoes you should be fine.
to use it in an app, you would need to create a Gemfile and run Bundle install within your folder
I'm using Debian 5
Ruby version 1.8.7
Rubygems version 2.0.3
Rails version 3.2.12
I made my Ruby on Rails app and want to deploy it publicly, so I tried to install "Mongrel" without any luck and then "Unicorn" also without any luck and same error.
vps1198019:~# gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ext/http11/gem_make.out
and
vps1198019:~# gem install unicorn
Building native extensions. This could take a while...
ERROR: Error installing unicorn:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0/ext/kgio/gem_make.out
Try using below command. Because of version mismatch, gem is not installed.
$ gem install mongrel --pre
So I found a solution for my problem by installed it more manually. I downloaded Unicorn from http://rubyforge.org/frs/?group_id=1306 (.gem file). Stored it in server. Went to that folder with terminal. Then I accessed it with
gem install --local unicorn.gem
Then it prompted that I must have kgio and raindrops so I installed them:
gem install kgio
gem install raindrops
and repeated first command.
I need to use ruby 1.8.6 to run a legacy script. I've installed NetBeans 6.9.1 and I'm trying to use the fast debugger but when I try to install it I get:
/home/eianni/.rvm/gems/ruby-1.8.6-p420#xml2rpc/gems/rubygems-bundler-0.3.0/lib/rubygems_bundler/regenerate_binstubs_command.rb:34: warning: parenthesize argument(s) for future version
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.
/home/eianni/.rvm/rubies/ruby-1.8.6-p420/bin/ruby mkrf_conf.rb
/home/eianni/.rvm/gems/ruby-1.8.6-p420#xml2rpc/gems/rubygems-bundler-0.3.0/lib/rubygems_bundler/regenerate_binstubs_command.rb:34: warning: parenthesize argument(s) for future version
Gem files will remain installed in /home/eianni/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9 for inspection.
Results logged to /home/eianni/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.9/ext/gem_make.out
This is probably because the ruby version is too old, but is there a way to tell Netbeans to use a different version for ruby-debug-ide. I can install withouth problems ruby-debug-ide 0.10.0.
I'm using Ubuntu 10.04
In order to use ruby-debug-ide 0.4.9 with Ruby 1.8.6, you have to install ruby-debug-base 0.10.3 and linecache 0.45.
To know and manage your gems in Netbeans :
Tools -> Ruby Gems -> Installed
I've installed a instantrail2.0. I want to install watir 1.65
First I installed watir-1.6.5.gem it said 302 fetching http://gems.r....
then I downlord a rubygems-update-1.3.7.gem and type
gem install --local rubygems-update-1.3.7.gem
successfully installed.
then I type in update_rubygems
next I type in gem install watir-1.6.5.gem
but it appears ERROR:Failed to build gem native extension
I searched and found an answer that 1.3.7 doesn't support win32.
then I type
gem install sqlite3-ruby -v 1.3.0 gem install watir-1.6.5.gem
ERROR:Failed to build gem native extension
gem install sqlite3-ruby -v 1.2.3 gem install watir-1.6.5.gem
ERROR:Failed to build gem native extension
How can I do next??
use a more current version of Watir
I second Zeljko, going with the latest versions of rubygems and watir totally makes sense. If you must stick to older gems, try installing Ruby DevKit and then do the gem install to see if that helps.
What version of Ruby are you using? You should be using Ruby 1.8.6 with that version of Watir. I am also wondering if part of your problem is that you are doing a local install, instead of installing from internet. Local installs of Watir are difficult because of all of its dependencies.