Vagrant Ruby Help

System Info

OS: Leap 42.1
Kernel: 4.1.38-50-default

Hi everyone,

Vagrant keeps returning Ruby error message on vagrant up and when installing vagrant plugins. Example below:


$ vagrant plugin install vagrant-hostsupdater
Installing the 'vagrant-hostsupdater' plugin. This can take a few minutes...
/usr/lib64/ruby/gems/2.1.0/gems/vagrant-1.9.1/lib/vagrant/bundler.rb:378:in `block in find_all': undefined method `match?' for #<Gem::Resolver::DependencyRequest:0x0000000282a968> (NoMethodError)

Any ideas what I am missing or suggestions for getting vagrant working?

Appreciate any suggestions!

Vagrant and ruby installation info below.


$ zypper info vagrant
Loading repository data...
Reading installed packages...

Information for package vagrant:
--------------------------------
Repository: Virtualization
Name: vagrant
Version: 1.9.1-9.1
Arch: x86_64
Vendor: obs://build.opensuse.org/Virtualization
Installed: Yes
Status: up-to-date
Installed Size: 4.0 MiB


$ zypper info ruby
Loading repository data...
Reading installed packages...

Information for package ruby:
-----------------------------
Repository: Main Repository (OSS)
Name: ruby
Version: 2.1-3.2
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 84 B


$ zypper se -i rubygem
Loading repository data...
Reading installed packages...

S | Name                         | Summary                                                           | Type   
--+------------------------------+-------------------------------------------------------------------+--------
i | ruby2.1-rubygem-bundler      | The best way to manage your application's dependencies            | package
i | ruby2.1-rubygem-childprocess | This gem aims at being a simple and reliable solution for         | package
i | ruby2.1-rubygem-erubis       | a fast and extensible eRuby implementation which supports         | package
i | ruby2.1-rubygem-fast_gettext | A simple, fast, memory-efficient and threadsafe implementation of | package
i | ruby2.1-rubygem-ffi          | Ruby FFI                                                          | package
i | ruby2.1-rubygem-gem2rpm      | Generate rpm specfiles from gems                                  | package
i | ruby2.1-rubygem-i18n         | New wave Internationalization support for Ruby                    | package
i | ruby2.1-rubygem-listen       | Listen to file modifications                                      | package
i | ruby2.1-rubygem-log4r        | Log4r, logging framework for ruby                                 | package
i | ruby2.1-rubygem-mime-types   | The mime-types library provides a library and registry for        | package
i | ruby2.1-rubygem-mini_portile | Simplistic port-like solution for developers                      | package
i | ruby2.1-rubygem-net-scp      | A pure Ruby implementation of the SCP client protocol             | package
i | ruby2.1-rubygem-net-sftp     | A pure Ruby implementation of the SFTP client protocol            | package
i | ruby2.1-rubygem-net-ssh      | Net::SSH: a pure-Ruby implementation of the SSH2 client protocol  | package
i | ruby2.1-rubygem-netrc        | Library to read and write netrc files                             | package
i | ruby2.1-rubygem-nokogiri     | Nokogiri (é¸) is an HTML, XML, SAX, and Reader parser            | package
i | ruby2.1-rubygem-rb-fsevent   | Very simple & usable FSEvents API                                 | package
i | ruby2.1-rubygem-rb-inotify   | A Ruby wrapper for Linux's inotify, using FFI                     | package
i | ruby2.1-rubygem-rest-client  | Simple HTTP and REST client for Ruby, inspired by microframework  | package
i | ruby2.1-rubygem-ruby-dbus    | Ruby module for interaction with D-Bus                            | package

I wrote how to setup Ruby on 13.2, the guide still applies to LEAP with modifications to add the LEAP repo. In general, I always recommend adding the language specific repo whenever you Develop (create code) a solution, using only the main OSS repo as you’re doing is mostly suitable for running simple, pre-compiled apps.

I recommend you focus on the “Preamble” and “Install Ruby from openSUSE repos” sections although you can choose to follow instructions for installing from other source if you wish.

https://en.opensuse.org/User:Tsu2/Install_Ruby

Some changes to the above guide to support LEAP 42.1, the following adds the Ruby repo for 42.1

zypper ar -f http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/openSUSE_Leap_42.1/ devel:languages:ruby:extensions && zypper up 

Because ruby 2.1 is the default today, you may not need to install any specific version of Ruby.

Hopefully your updated system should be able to satisfy the problem dependency, if you still have a problem then you can try following the instructions to install Ruby from the Ruby repositories instead.

TSU

Thanks, the problem ending up being with version of vagrant in the opensuse repo, so i just ending up installing the rpm from vagrant’s download page and everything worked fine.

vagrant needs ruby 2.2.3, so the guide was useful in getting background on using rbenv to upgrade ruby. upgrading through opensuse package manager was kind of pain since YaST and several other applications depend on the version installed with the system.