Can't install Vagrant 1.0.4 with gem - ruby

I'm trying to install Vagrant 1.0.4 with gem but it's not working for me and I can't think of a fix. I enter this prompt and I get the following message:
gem install vagrant -v 1.0.4
Building native extensions. This could take a while...
ERROR: Error installing vagrant:
ERROR: Failed to build gem native extension.
I am restricted to using Ruby 1.8.7 in this environment, and also Vagrant 1.0.4.
The log is huge so I'm putting it on Pastebin.
Thanks.

Related

How to install vagrant-libvirt plugin on Ubuntu 14.04

When I run
$ vagrant plugin install vagrant-libvirt
on Ubuntu 14.04 I get following error message:
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing rack (2.0.1), and Bundler cannot continue.
Make sure that `gem install rack -v '2.0.1'` succeeds before bundling.
Gem::InstallError: rack requires Ruby version >= 2.2.2.
The version numbers in this error message are a bit misleading thou, because I've got ruby 2.3.3 installed via ppa:brightbox/ruby-ng
$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux-gnu]
Running the gem command from the error message fails because of insufficient privileges:
gem install rack -v '2.0.1'
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.
As superuser it works fine:
$ sudo gem install rack -v '2.0.1'
Successfully installed rack-2.0.1
Parsing documentation for rack-2.0.1
Done installing documentation for rack after 1 seconds
1 gem installed
Thou running sudo vagrant plugin install vagrant-libvirt still fails with the same error message.
What's going on here? How can in get this to work?

Failed to Install Compass 1.0.1 on Ubuntu 14.04

I can't install latest Compass 1.0.1 on Ubuntu 14.04.
$ ruby --version
ruby 2.0.0p384 (2014-01-12) [i386-linux-gnu]
$ gem --version
2.0.14
I'm doing:
$ sudo gem install compass -v 1.0.1
The first error in the log is this:
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
And here's the full log:
https://gist.github.com/slavafomin/055394e379e8252bab9e
I'm installing Ruby via this packages:
ruby2.0
ruby2.0-dev
I even tried to install Ruby via RVM, but I'm getting the same error.
What could be the problem?
Is it possible to install latest version of Compass on Ubuntu 14.04 without RVM?
It looks like problem is actually with ffi extension.
When I've tried to install ffi manually with this command: sudo gem install ffi, it failed with the same error as above. However, when I've specified latest stable version like this: sudo gem install ffi -v 1.9.6 it installed correctly. After that Compass installed like a charm.
I will leave it here if someone will encounter this problem in the future.
Also, this Q/A could be useful:
ERROR: Error installing ffi: ERROR: Failed to build gem native extension
I've posted an issue on FFI's GitHub repository:
https://github.com/ffi/ffi/issues/414

Errors Installing vagrant.berkshelf

I working on a Windows 7 machine with Vagrant v 1.4.1 and I have been struggling to install the vagrant-berkshelf plugin. I'm following some instructions from a blog by Mischa Taylor. I've installed VirtualBox (4.2.20), a "sane" Ruby environment (with the DevKit) and the berkshelf gem and that went fine as well but whenever I issue the
> vagrant plugin install vagrant-berkshelf
The command returns an error when trying to build the
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/builder.rb:62:in `run':
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
C:/HashiCorp/Vagrant/embedded/bin/ruby.exe extconf.rb
C:/HashiCorp/Vagrant/embedded/bin/ruby.exe: invalid option -J (-h will show valid
options) (RuntimeError)
Gem files will remain installed in C:/Users/user_me/.vagrant.d/gems/gems/hitimes-
1.2.1 for inspection.
Results logged to C:/Users/user_me/.vagrant.d/gems/gems/hitimes-1.2.1/ext/hitimes/c/gem_make.out
from
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:39:in `block in build'
if I issue
> gem install hitimes
that works fine, so the problem seems to be in the extension builder that Vagrant uses. I don't have alot of experience working with Ruby I was just wanting to start learning to use chef and berkshelf with vagrant.
This may be due to the version of Ruby
try rvm to manage your ruby environments, download ruby 1.9.3 through rvm
then
rvm use 1.9.3
vagrant plugin install vagrant-berkshelf

Problems installing gems with RubyGems

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.

Installing Watir-Web Driver on Fedora Linux

I'm trying to install watir-webdriver by using gem install watir-webdriver on Linux. I have installed ruby 1.8.6, activesupport 2.3.8 as well as firewatir. However, when I try to install watir-webdriver, I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing watir-webdriver:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
can't find header files for ruby.
(btw, for a bit of context - I'm a complete Linux newbie)
Assuming you installed ruby with yum, you'll need the rpm for development headers.
sudo yum install ruby-devel
and try again.

Resources