I'm trying to install the gem selenium-webdriver on Ubuntu 19.04 but I keep getting this error:
sudo gem install selenium-webdriver
Building native extensions. This
could take a while... ERROR: Error installing selenium-webdriver:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/childprocess-1.0.1/ext /usr/bin/ruby2.5 mkrf_conf.rb
current directory: /var/lib/gems/2.5.0/gems/childprocess-1.0.1/ext
/usr/bin/ruby2.5 -rrubygems
/usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake
RUBYARCHDIR\=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/childprocess-1.0.1
RUBYLIBDIR\=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/childprocess-1.0.1
/usr/bin/ruby2.5: No such file or directory --
/usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake
(LoadError)
rake failed, exit code 1
Gem files will remain installed in
/var/lib/gems/2.5.0/gems/childprocess-1.0.1 for inspection. Results
logged to
/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/childprocess-1.0.1/gem_make.out
I have tried
sudo gem update --system
sudo apt install ruby-dev
sudo apt install build-essential
sudo apt install gcc
sudo apt install make
ruby -v ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnu]
gem -v 3.0.3
I had to do this
sudo gem pristine rake
Restoring gems to pristine condition... Cached gem for rake-12.3.1 not
found, attempting to fetch... Fetching rake-12.3.1.gem Restored
rake-12.3.1
Related
I am trying to install nokogiri on Ubuntu Linux. I am running Ruby-2.1.1. I have installed.
Output:
sudo gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20181205-6502-3n3u4g.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.5.0/gems/nokogiri-1.8.5 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.5/gem_make.out
Can anyone explain what I am missing?
Try installing Ruby 2.1.1 with rbenv and set it as default version in ubuntu:
rbenv install 2.1.1
rbenv global 2.1.1
After installing ruby, install the following packages:
sudo apt-get install libxslt-dev libxml2-dev zlib1g-dev
And then install nokogiri:
sudo gem install nokogiri
This should do the trick...
When i run:
sudo gem install yajl-ruby
I see errors:
Building native extensions. This could take a while...
ERROR: Error installing yajl-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/yajl-ruby-1.2.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/yajl-ruby-1.2.1/ext/yajl/gem_make.out
I have installed yum install ruby rubygems ruby-devel, but still have this problem.
Try:
$ sudo ln -s /usr/bin/llvm-gcc /usr/bin/gcc-4.2
$ sudo gem install yajl-ruby
I followed Heroku getting started from the beginning up to 'bundle install' (step #declare-app-dependencies) and saw an error. Some dependencies seem missing but I don't know how to find what they are. Can anybody tell what I should do?
$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Using rake 10.3.2
Using i18n 0.6.9
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.0 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
Gem files will remain installed in /tmp/bundler20140919-3839-1mafrop/json-1.8.1/gems/json-1.8.1 for inspection.
Results logged to /tmp/bundler20140919-3839-1mafrop/json-1.8.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
Environment =
linuxmint 64bit as VM guest
ruby 2.0.0p299 (2013-08-29) [x86_64-linux-gnu]
gem -v = 2.0.7
gem list --local = bundler (1.7.3), i18n (0.6.9), rake (10.3.2)
installed Heroku Toolbelt
using the example code as in the instructions
After hours of trial I could finally bundle install. I did
sudo apt-get purge ruby*
sudo apt-get install ruby
sudo apt-get install ruby-dev
sudo gem install bundler
After these, bundle install passed json-1.8.1 without error. Then error came
...
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
...
so I did
sudo apt-get install libpq-dev
Then bundle install again. And it read Your bundle is complete!.
For your reference, I did the following as well. I do not know if the Heroku getting started example really needs them.
sudo apt-get install postgresql postgresql-contrib
sudo apt-get install libmagickwand-dev python-dev
I was trying to install bundler in Linux Mint.
but I'm getting this error
$ gem install bundler
ERROR: Could not find a valid gem 'bundler' (>= > 0) in any repository
Tried to do
$ gem update --system
but this is not permitted in Debian based systems.
what to do??
Run
gem sources -a http://rubygems.org
Then run gem install
When I tried to install: gem install sqlite3-ruby it shows:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:3
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out
My environment:
sqlite: 2.8.17
rails: 3.0.0
ruby: 1.9.2
ubuntu: 10.04
gem: 1.3.7
I have looking all similiar question in webs and SO, nothing help, what should I do? :(
I had this same problem. I solved it by
sudo apt-get install sqlite3 libsqlite3-dev
Then the following command worked.
sudo gem install sqlite3-ruby