読者です 読者をやめる 読者になる 読者になる

てしりこじり

しりがちいさいエンジニアがいるという

vagrant-share can't be installed without vagrant login (RuntimeError) に対処

vagrantvagrant−share が RuntimeError

久しぶりに休みなので macvagrant いじろうとしたらエラーナタヨ。

$ vagrant
/Users/hoge/.vagrant.d/gems/gems/vagrant-share-1.1.4/lib/vagrant-share/activate.rb:8:in `rescue in <encoded>': vagrant-share can't be installed without vagrant login (RuntimeError)
  from /Users/hoge/.vagrant.d/gems/gems/vagrant-share-1.1.4/lib/vagrant-share/activate.rb:5:in `<encoded>'
  from /Users/hoge/.vagrant.d/gems/gems/vagrant-share-1.1.4/lib/vagrant-share/activate.rb:16:in `RGLoader_load'
    from /Users/hoge/.vagrant.d/gems/gems/vagrant-share-1.1.4/lib/vagrant-share/activate.rb:16:in `<top (required)>'
  from /Users/hoge/.vagrant.d/gems/gems/vagrant-share-1.1.4/lib/vagrant-share.rb:23:in `require'
  from /Users/hoge/.vagrant.d/gems/gems/vagrant-share-1.1.4/lib/vagrant-share.rb:23:in `block in <class:Plugin>'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:75:in `call'
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:75:in `block (2 levels) in help'
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/registry.rb:48:in `block in each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/registry.rb:47:in `each'
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/registry.rb:47:in `each'
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:69:in `block in help'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/optparse.rb:885:in `initialize'
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:57:in `new'
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:57:in `help'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:32:in `execute'
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:292:in `cli'
  from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/bin/vagrant:174:in `<main>'

$
$
$ vagrant -v
Vagrant 1.6.5
$
$

原因

ruby 2.2.0 にあげたのでその原因かと思いましたが、
調べたら普通にエラーで普通に解決されてました。おうふ。

Running vagrant 1.7.0 without arguments generates "vagrant-share can't be installed without vagrant-login" error · Issue #4923 · mitchellh/vagrant · GitHub

対処

vagrant のアップデートですね。
Vagrant から新しいバージョンをダウンロードしてインストールします。
で。再度実行。

$ vagrant
Usage: vagrant [options] <command> [<args>]

    -v, --version                    Print the version and exit.
    -h, --help                       Print this help.

Common commands:
     box             manages boxes: installation, removal, etc.
     connect         connect to a remotely shared Vagrant environment
     destroy         stops and deletes all traces of the vagrant machine
     global-status   outputs status Vagrant environments for this user
     halt            stops the vagrant machine
     help            shows the help for a subcommand
     init            initializes a new Vagrant environment by creating a Vagrantfile
     login           log in to HashiCorp's Atlas
     package         packages a running vagrant environment into a box
     plugin          manages plugins: install, uninstall, update, etc.
     provision       provisions the vagrant machine
     push            deploys code in this environment to a configured destination
     rdp             connects to machine via RDP
     reload          restarts vagrant machine, loads new Vagrantfile configuration
     resume          resume a suspended vagrant machine
     sandbox
     share           share your Vagrant environment with anyone in the world
     ssh             connects to machine via SSH
     ssh-config      outputs OpenSSH valid configuration to connect to the machine
     status          outputs status of the vagrant machine
     suspend         suspends the machine
     up              starts and provisions the vagrant environment
     version         prints current and latest Vagrant version

For help on any individual command run `vagrant COMMAND -h`

Additional subcommands are available, but are either more advanced
or not commonly used. To see all subcommands, run the command
`vagrant list-commands`.

$
$
$ vagrant -v
Vagrant 1.7.2

動いたよッヽ(゚∀゚)ノ☆

ざっと読みましたが初メテ触るのにはよいのでは。

Vagrant入門ガイド

Vagrant入門ガイド