Last modified: 2014-09-26 15:38:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71052, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69052 - Unprivileged user can't install nokogiri gem so setup.sh fails
Unprivileged user can't install nokogiri gem so setup.sh fails
Status: RESOLVED WONTFIX
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
PC Linux
: Unprioritized major
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-02 15:07 UTC by Jamison Lofthouse
Modified: 2014-09-26 15:38 UTC (History)
7 users (show)

See Also:
Web browser: Google Chrome
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Output from setup.sh and gem install nokogiri -v '1.6.3.1' (4.92 KB, text/plain)
2014-08-02 15:07 UTC, Jamison Lofthouse
Details
Output of nokogiri under root (3.20 KB, text/plain)
2014-08-02 15:51 UTC, Jamison Lofthouse
Details

Description Jamison Lofthouse 2014-08-02 15:07:27 UTC
Created attachment 16129 [details]
Output from setup.sh and gem install nokogiri -v '1.6.3.1'

When I try to run the setup script of vagrant for the first time I get an error telling me bundler had a problem (see attachment for output). It says to make sure gem install nokogiri -v '1.6.3.1' executes without any errors. So I run gem install nokogiri -v '1.6.3.1' and see that my unprivileged user doesn't have access to some gem files. I could run these commands as root but then vagrant would be installed for root and wouldn't be able to access virtualbox. The only thing I can do is temporarily chmod those files into being able to be accessed by anyone. Installing the mediawiki-vagrant plugin (separately) works as expected. openSUSE 13.1
Vagrant 1.6.3
ruby 2.0.0p247 (2013-06-27) [x86_64-linux]
Comment 1 Bryan Davis 2014-08-02 15:33:27 UTC
Similar problems were reported in bug 68453. We eventually closed that as "works for me", but the original reporter mentioned that they had to use sudo to get the install to complete.
Comment 2 Jamison Lofthouse 2014-08-02 15:40:42 UTC
I have installed everything using root (su instead of sudo but that shouldn't matter) but that installs everything under root which can't access virtualbox.
Comment 3 Bryan Davis 2014-08-02 15:43:17 UTC
nokogiri is not a direct requirement of the vagrant-vbguest plugin. I'm not exactly sure what is causing it to be installed/updated by the plugin install. Maybe Dan can provide more insight on the ruby mechanisms involved. I believe that  this is something which has changed in the installation requirements of the vagrant-vbguest plugin within the 4-6 weeks. The plugin itself has not been updated for some time, so I must be related to a updated dependency.

One thing we could think about is finding a way to reinstate the bundled version of the plugin from Ib2efe79591c5c2f12833068fbe777831cb15f167. This is likely blocked on Vagrant upstream restoring a means of running plugins without installing them however.
Comment 4 Jamison Lofthouse 2014-08-02 15:51:46 UTC
Created attachment 16130 [details]
Output of nokogiri under root
Comment 5 Jamison Lofthouse 2014-08-02 15:53:35 UTC
Installing nokogiri and vagrant-vbguest works:
linux-c6mg:/home/jamison # vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbguest (0.10.0)'!
Comment 6 Jamison Lofthouse 2014-08-02 15:55:53 UTC
(In reply to Jamison Lofthouse from comment #5)
> Installing nokogiri and vagrant-vbguest works:
> linux-c6mg:/home/jamison # vagrant plugin install vagrant-vbguest
> Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
> Installed the plugin 'vagrant-vbguest (0.10.0)'!

I forgot to mention that that is under root.
Comment 7 Jamison Lofthouse 2014-08-02 16:01:08 UTC
I guess mediawiki-vagrant isn't installing. I now get this:
jamison@linux-c6mg:~/vagrant> vagrant plugin install mediawiki-vagrant
Installing the 'mediawiki-vagrant' plugin. This can take a few minutes...
The plugin 'mediawiki-vagrant' could not be installed because it could not
be found. Please double check the name and try again.
Comment 8 Bryan Davis 2014-08-02 16:16:00 UTC
(In reply to Jamison Lofthouse from comment #7)
> jamison@linux-c6mg:~/vagrant> vagrant plugin install mediawiki-vagrant

The mediawiki-vagrant plugin is not published in a way that is compatible with this particular install command. It can instead be installed via:

  $ gem build mediawiki-vagrant.gemspec
  $ vagrant plugin install mediawiki-vagrant-<VERSION>.gem
Comment 9 Jamison Lofthouse 2014-08-02 16:57:18 UTC
So I got the mediawiki-vagrant plugin installed. Now it wants me to install NFS. openSUSE doesn't have an nfsd package but it does have a nfs-kernel-server package and I already installed it. What do I still need to install?
Comment 10 Bryan Davis 2014-08-02 17:30:35 UTC
(In reply to Jamison Lofthouse from comment #9)
> So I got the mediawiki-vagrant plugin installed. Now it wants me to install
> NFS. openSUSE doesn't have an nfsd package but it does have a
> nfs-kernel-server package and I already installed it. What do I still need
> to install?

I think these instructions <https://en.opensuse.org/SDB:Network_file_system> may help. Be aware that older versions of the Vagrant application had issues with OpenSUSE and NFS <https://github.com/mitchellh/vagrant/issues/2923> but I believe that this has been corrected in Vagrant 1.6.3.
Comment 11 Jamison Lofthouse 2014-08-02 17:39:24 UTC
I actually was reading both of those sites. The openSUSE documentation isn't very helpful because its just explaining how to configure it (vagrant should do that) and I looked it the file that was changed in the GitHub bug and the files are way different. They must have been significantly changed between releases.
Comment 12 Jamison Lofthouse 2014-08-02 17:51:36 UTC
It seems my nfs and nfsserver services aren't running. I tried starting them and now I get "Could not bind socket: (98) Address already in use".
Comment 13 Jamison Lofthouse 2014-08-02 18:11:40 UTC
I guess that error was because I was trying to start nfs when it was already start because it started working after a reboot. Vagrant now works. So it seem vagrant can work when the vagrant-vbguest is broken.
Comment 14 Bryan Davis 2014-08-10 09:57:15 UTC
There is an upstream bug report at https://github.com/mitchellh/vagrant/issues/3769 . It seems that this may be an artifact of a particular broken version of the nokogiri gem.
Comment 15 Mitar 2014-08-10 09:59:50 UTC
I have the same problem, but with clean installation.
Comment 17 Bryan Davis 2014-08-28 20:34:28 UTC
(Copied from Bug 68453 comment #15)
> I ran into a similar problem with a clean install on OS X 10.9.4. I finally
> got it working by first installing libiconv from source, and then pointing
> nokogiri to the libxml2 that came with XCode and telling nokogiri install to
> use system libraries:
> 
> $ sudo /Applications/Vagrant/embedded/bin/gem install --install-dir
> ~/.vagrant.d/gems nokogiri -v '1.6.3.1' --
> --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/
> MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2
> --use-system-libraries
Comment 18 Bryan Davis 2014-09-05 02:01:16 UTC
I had this problem again while installing a random Vagrant plugin (https://github.com/dergachev/vagrant-vbox-snapshot) and was able to work around it using the advice from comment #17. I did not need to use sudo.

$ /Applications/Vagrant/embedded/bin/gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.3.1' -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 --use-system-libraries --no-ri --no-rdoc
Comment 19 Bryan Davis 2014-09-26 15:38:17 UTC
This problem is caused by ruby and system library issues on OSX and is not specific to MediaWiki-Vagrant. Closing this issue as WONTFIX but hoping that the workarounds documented here can be found and used by anyone who happens to run into the problem in the future.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links