質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Laravel

LaravelとはTaylor Otwellによって開発された、オープンソースなPHPフレームワークです。Laravelはシンプルで表現的なシンタックスを持ち合わせており、ウェブアプリケーション開発の手助けをしてくれます。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

0回答

1630閲覧

Homesteadを使いたいのですが、vagrant upで「no implicit conversion of nil into String (TypeError)」とエラーが出ます

TETEN

総合スコア12

Laravel

LaravelとはTaylor Otwellによって開発された、オープンソースなPHPフレームワークです。Laravelはシンプルで表現的なシンタックスを持ち合わせており、ウェブアプリケーション開発の手助けをしてくれます。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2020/11/23 06:47

前提・実現したいこと

これまでXAMPPでLaravelを勉強しておりました。
今回、初めてHomesteadを用いたLaravelの環境構築を試しているのですが、途中でエラーが出て進めず悩んでいます。

Laravelの公式ドキュメントに従い、

  • VirtualBoxのインストール
  • Vagrantのインストール
  • vagrant box add laravel/homesteadでHomestead Vagrant Boxをインストール
  • git clone https://github.com/laravel/homestead.git ~/HomesteadでHomesteadをインストール
  • Homesteadディレクトリでgit checkout release bash init .sh
  • ユーザーディレクトリ下(C:\Users\xxx\)にcodeディレクトリを作成
  • Homestead.yamlファイルの「folders: - map:」のパスを「C:\Users\xxx\code」に書き換えて保存
  • vagrant upという手順で行いました。

発生している問題・エラーメッセージ

以下のエラーメッセージが出ます。

xxx@yyy MINGW64 ~/Homestead (release) $ vagrant up Bringing machine 'homestead' up with 'virtualbox' provider... ==> homestead: [vagrant-hostsupdater] Checking for host entries C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:126:in `digest': no implicit conversion of nil into String (TypeError) from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:126:in `hexdigest' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:126:in `signature' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:73:in `createHostEntry' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:42:in `block (2 levels) in addHostEntries' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:36:in `each' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:36:in `block in addHostEntries' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:35:in `each' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:35:in `addHostEntries' from C:/Users/xxx/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:17:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/commands/up/middleware/store_box_metadata.rb:33:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/created.rb:15:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `block in run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/call.rb:43:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `block in run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:246:in `action_raw' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:215:in `block in action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:613:in `lock' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in `action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'

Homestead.yamlの内容

--- ip: "192.168.10.10" memory: 2048 cpus: 2 provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: C:\Users\xxx\code to: /home/vagrant/code sites: - map: homestead.test to: /home/vagrant/code/public databases: - homestead features: - mysql: false - mariadb: false - ohmyzsh: false - webdriver: false # ports: # - send: 50000 # to: 5000 # - send: 7777 # to: 777 # protocol: udp

試したこと

  • 公開鍵はC:\Users\xxx.sshディレクトリにおいてssh-keygenコマンドで作成しました。
  • Homestead.yamlのauthorize及びkeysをコメントアウトしてみましたが変わりません。
  • Homestead.yamlのauthorize及びkeysを「C:\Users\xxx\」からの絶対パスに書き換えてみましたが変わりません。
  • カスペルスキーを終了させてみましたが変わりません。
  • 「bcdedit /set hypervisorlaunchtype off」コマンドでHyper-Vを無効にできると聞き、正しく終了しましたが変わりません。
  • XAMPPのApacheを停止しましたが変わりません。
  • VirtualBoxに別にインストールしたUbuntuは起動できます。
  • Cドライブの容量は100G近く残っています。

補足情報(FW/ツールのバージョンなど)

OS:Windows10 Home 20H2
ターミナル:Git Bash
VirtualBox:6.1.16
Vagrant:2.2.14
git 2.28.0

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問