LoginSignup
1
0

More than 3 years have passed since last update.

Homesteadでvagrant upしたらhomestead.rbがない。と怒られた時に試した方法

Posted at

いろんな記事見てたどり着いた答えを書いてく

環境

  • Homestead
  • Vagrant2.2.5
  • Laravel5.7

現象

自分の環境でvagrant upした時に以下のエラーが出た

Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /Users/namizato/app/Sample/Vagrantfile
Line number: 0
Message: LoadError: cannot load such file -- /Users/namizato/app/Sample/vendor/laravel/homestead/scripts/homestead.rb

どうやらhomestead.rbがないと言われてるようだった。

試したこと

上記のエラー文を検索したら一番最初に出てきた先輩の記事

【Vagrant】vagrant upするとエラーが発生するようになったので修正しました、という軌跡

Vagrantをバージョンアップしてもダメなら下記を試したらいけたとのこと。

vagrant plugin expunge --reinstall

しかし自分の環境じゃ変わらず。。

ComposerのUpdate

次はcomposer updateをしたら直ったよ!という記事があったので試してみる。

composer update

.....自分の環境じゃダメだった。。

Composerを入れ直す

とりあえずComposer入れ直してみるか。。くらいのつもりでやる

 composer require laravel/homestead --dev
vagrant up

.....イケた!?!?

という事でcomposerを入れ直したらいけました。。なぜかは分かりませんが、原因わかる人いたらコメントください( ;∀;)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0