Laravel Error loading vagrant file - php

I have a freshly installed Laravel. I did a vagrant destroy --force before installation.
Every time I run anything using vagrant on my laravel project directory, I get this error.
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: /Applications/MAMP/htdocs/Sites/project-flyer/Vagrantfile
Line number: 12
Message: LoadError: cannot load such file -- /Applications/MAMP/htdocs/Sites/project-flyer/vendor/laravel/homestead/scripts/homestead.rb
exit 1
Now, I've checked, looking for homestead.rb but vendor/laravel/homestead folder doesn't exist. I'm lost.

It seems there is a broken homestead installation in your directory. You could do:
Deinstall the existing homestead with composer remove laravel/homestead
Reinstall homestead with composer require laravel/homestead --dev
Initizialie homestead and Vagrant configuration php vendor/bin/homestead make
For details you can also consult the homestead documentation.

Related

Why does laravel get an application error

In the windows 10 operating system I installed a homestead laravel for project deployment.
After I worked in a vagrant homestead virtual machine, I ran the command vagrand halt
The next day I launched a homestate with the command vagrant up
I connected via SSH to the homestead virtual machine, enter the command php artisan and get the error:
In LoadConfiguration.php line 68:
Unable to load the "app" configuration file.
When opening the site, the error is as follows:
Fatal error: Uncaught RuntimeException: A facade root has not been set. in /home/vagrant/code/projects/forum/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234
RuntimeException: A facade root has not been set. in /home/vagrant/code/projects/forum/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234
This has already been solved, on GitHub: https://github.com/laravel/homestead/issues/1219
Try upgrading to VM 6.
Update
Download and install the latest version of vagrant:
https://www.vagrantup.com/downloads.html
Updating homestead:
vagrant global-status
This will list all your vagrant boxes with box name in the 2nd column
vagrant box update "{box_name}"
Download and install the latest VM: https://www.virtualbox.org/wiki/Downloads
Here you may need to uninstall the old version at first

Laravel/homestead - <internal:gem_prelude>:4:in `require': cannot load such file -- rubygems.rb (Loa dError)

I am installing Laravel Homestead. (I have installed the latest Virtualbox and Vagrant).
When I am using the following command
vagrant box add laravel/homestead
I am getting the answer
<internal:gem_prelude>:4:in `require': cannot load such file -- rubygems.rb (LoadError)
from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
Please, help. I have no idea what I am doing wrong.

Laravel 5.4.* - The "" directory does not exist when running artisan

I have a fresh installation of Ubuntu Server 14.04 in which I'm currently trying to install my Laravel project on.
I have moved the entire repository into the folder required, but when I run the command
php artisan
within that directory, the terminal returns an error stating
[InvalidArgumentException]
The "" directory does not exist.
Does anyone know what I can possibly do to solve this issue?
I had this same issue and it turned out that I was not cloning the ./config directory because of a poorly defined .gitignore. So make sure the original project location was able to push that directory up and that it exists in the new location.
After the clone I re-ran composer install and it all worked.
I had been facing the same issue and I found that there was an empty folder in Module Directory. I had just deleted that Module Directory and again started with new Module Directory and it had solved the problem.
Same issue, resolved it by running php artisan config:cache
in my case, i run composer install and it through below error
Problem 1
- lcobucci/jwt is locked to version 4.1.4 and an update of this package was not requested.
then I run
composer update
and it worked like a charm.

Laravel Homestead: 'homestead init' -> could not open input file

I am trying to install the latest version of Laravel Homestead on my PC and when I try running the command homestead init in my command terminal, I keep getting a "Could not open input file" error.
Steps I've taken so far with installing Laravel Homestead:
1) Created a new directory at C:\Users\Jeff\Desktop\Code
2) Installed Composer
3) Installed VirtualBox and Vagrant Box
4) In 'cmd', ran the command vagrant box add laravel/homestead
5) Copied the Composer files from C:\ProgramData\ComposerSetup\bin into my C:\Users\Jeff\Desktop\Code directory.
6) In 'cmd', ran the command composer global require "laravel/homestead=~2.0"
Since I am following the Laravel homestead installation guide the next step is to copy the ~/.composer/vendor/bin directory to my PATH so that the homestead command is executable but this is where I get confused.
I have tried a couple of things but they have not worked for me.
In my ~/.composer/vendor/bin directory, I have copied the homestead directory files into my C:\Users\Jeff\Desktop\Code directory but when I try running the command homestead init, I keep getting the error Could not open input file: C:\Users\Jeff\Desktop\Code/../laravel/homestead/homestead
On Windows use homestead.bat init instead of homestead init.

Laravel/homestead installation issues

I am trying to install the homestead vagrant box for developing purposes. I followed this guide, but when i use homestead init i get this error: 'homestead' is not recognized as an internal or external command, operable program or batch file. although i have ~/.composer/vendor/bin added to my PATH enviroment.
Does anyone know how i can solve this problem?
Try downgrading to Homestead 2.0.7 - there are currently some problems with Windows path to home folder.
Edit your composer.json file in %appdata%\Composer and change your laravel/homestead dependency to:
"laravel/homestead": "2.0.7"
Then run composer update on the file.
That worked for me!
See the bottom of this post: http://mikesinn.com/development/how-to-install-composer-in-windows/
add this location C:Users/m_000/AppData/Roaming/Composer/vendor/bin. into path window then run homestaed init

Categories