Homestead: no input file specified

Published 2 months ago by LaraLaralove

Hello this is my first post. i read it's a common issue and i already tried to use suggests i read in other posts but my laravel won't work still.

i followed all the steps, installed virtualbox, vagrant and so on just as laravel homestead guide said but everytime i try to run homestead.test in my browser i keep getting No input file specified.

Here attached is my Homestead.yaml, can you please help me find where is the mistake? thanks

    ---
    ip: "192.168.10.10"
    memory: 2048
    cpus: 1
    provider: virtualbox

    authorize: ~/.ssh/id_rsa.pub

    keys:
        - ~/.ssh/id_rsa

    folders:
        - map: ~/code
          to: /home/vagrant/code

        - map: /Users/antonio/Desktop/Projects/Full-Stack-Vue.js-2-and-Laravel-5 
          to: /home/vagrant/projects

    sites:
        - map: homestead.test
          to: /home/vagrant/code/Laravel/public
        - map: vuebnb.test
          to: /home/vagrant/vuebnb/public

    databases:
        - homestead
        - vuebnb

    # blackfire:
    #     - id: foo
    #       token: bar
    #       client-id: foo
    #       client-token: bar

    # ports:
    #     - send: 50000
    #       to: 5000
    #     - send: 7777
    #       to: 777
    #       protocol: udp
Best Answer (As Selected By LaraLaralove)
Cronix

Then this isn't the correct path on your host OS

- map: ~/Desktop/Projects/vuebnb

After altering the yaml file, always run vagrant reload --provision so it will reset everything up and reflect your changes.

Procat

Try SSHing into the vagrant box and see if it actually has files in /home/vagrant/code/Laravel/public, if it does, run "vagrant provision" again from the laravel project folder locally.

LaraLaralove

when i run vagrant in ssh it's fully empty

Jerome2116

Like @Procat suggested, you should try running vagrant provision or vagrant reload --provision

LaraLaralove

i only have a code directory which is empty... it's like it doesn't copy the right laravel stuff in the right place

Jerome2116

Have you added a fresh install of Laravel to your code folder? Like if you go into your code folder using Windows Explorer do you have a Laravel folder in there? And if so, does that Laravel folder have a laravel app in there?

LaraLaralove

i reinstalled all but still... now tried to use this settings in my homestead.yaml

folders: - map: ~/Desktop/Projects/vuebnb to: /home/vagrant/code

sites: - map: vuebnb.test to: /home/vagrant/code/public

on the desktop i have my projects/vuebnb folder with artisan, composer and all the other files but if i do vagrant ssh there just code with nothing inside

Cronix
Cronix
2 months ago (726,250 XP)

On your windows box, do you have this folder, and is it the root of your laravel project?

/Users/antonio/code

That's what you're saying here

- map: ~/code

can you ssh into the homestead vm, and do a cd ~ and then a ls -alh and do you see a "code" dir and a "projects" dir? If you cd into them, is there anything there?

One thing that definitely looks wrong is for this site:

folders:
- map: /Users/antonio/Desktop/Projects/Full-Stack-Vue.js-2-and-Laravel-5 
          to: /home/vagrant/projects
// ...

sites:
 - map: vuebnb.test
          to: /home/vagrant/vuebnb/public

You're telling it that the dir on vagrant for that site is /home/vagrant/projects, but in the site definition, there is no "projects" dir in the path (/home/vagrant/vuebnb/public)

LaraLaralove

i am trying to fix in many ways. Right now i destroyed vagrant homestead box and reinstalled from scratch, after copying a folder with Laravel installation in Desktop\Projects\vuebnb i made those steps

1) installed virtualbox and vagrant
2) vagrant box add laravel/homestead
3) git clone https://github.com/laravel/homestead.git ~/Homestead
4) cd ~/Homestead
5) git checkout v7.9.0
6) bash init.sh
7) edited homestead 
8) added 192.168.0.0 vuebnb.test in the host file
9) vagrant up

this is my homestead.yaml

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Desktop/Projects/vuebnb
      to: /home/vagrant/code

sites:
    - map: vuebnb.test
      to: /home/vagrant/code/public

databases:
    - vuebnb

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

if i do vagrant ssh, cd ~ and then ls -lha this is the result

[email protected]:~$ ls -lha
total 84K
drwxr-xr-x 12 vagrant vagrant 4.0K Jul  6 15:56 .
drwxr-xr-x  3 root    root    4.0K Jun  3 19:46 ..
-rw-r--r--  1 root    root    6.8K Jul  6 15:56 .bash_aliases
-rw-------  1 vagrant vagrant  110 Jul  6 16:21 .bash_history
-rw-r--r--  1 vagrant vagrant  220 Jun  3 19:46 .bash_logout
-rw-r--r--  1 vagrant vagrant 3.7K Jun  3 19:46 .bashrc
drwx------  4 vagrant vagrant 4.0K Jun  3 20:03 .cache
drwxr-xr-x  1 vagrant vagrant   68 Jul  6 14:00 code
drwxrwxr-x  4 vagrant vagrant 4.0K Jun  3 20:05 .composer
drwxr-xr-x  4 vagrant vagrant 4.0K Jun  3 19:57 .config
drwx------  3 vagrant vagrant 4.0K Jun  3 19:47 .gnupg
drwxr-xr-x  3 vagrant vagrant 4.0K Jun  3 20:03 .local
-rw-r--r--  1 root    root      61 Jul  6 15:56 .my.cnf
drwxrwxr-x  2 vagrant vagrant 4.0K Jul  6 15:02 .ngrok2
drwxr-xr-x  4 vagrant vagrant 4.0K Jun  3 19:58 .npm
drwxr-xr-x 11 vagrant vagrant 4.0K Jun  3 20:04 .oh-my-zsh
-rw-r--r--  1 vagrant vagrant  888 Jul  6 15:56 .profile
drwx------  2 vagrant vagrant 4.0K Jul  6 15:01 .ssh
-rw-r--r--  1 vagrant vagrant    0 Jun  3 19:47 .sudo_as_admin_successful
-rw-r--r--  1 vagrant vagrant    5 Jun  3 19:47 .vbox_version
-rw-r--r--  1 vagrant vagrant  298 Jun  3 20:03 .wget-hsts
-rw-r--r--  1 vagrant vagrant 3.1K Jun  3 20:04 .zshrc

what's wrong????

Cronix
Cronix
2 months ago (726,250 XP)

You used the wrong IP.

8) added 192.168.0.0 vuebnb.test in the host file

That should match what's in the yaml file

ip: "192.168.10.10"

if i do vagrant ssh, cd ~ and then ls -lha this is the result

drwxr-xr-x  1 vagrant vagrant   68 Jul  6 14:00 code

I see the code dir there, if you cd ~/code, do you see laravel? If so, everything except the ip seems to be set up for that site.

LaraLaralove

wrote 0.0 as habit... sorry, my bad... it is written correctly .10.10 but nothing

Cronix
Cronix
2 months ago (726,250 XP)

And do you see the laravel install in the ~/code dir on the vm?

LaraLaralove

no... code is empty

Cronix
Cronix
2 months ago (726,250 XP)

Then this isn't the correct path on your host OS

- map: ~/Desktop/Projects/vuebnb

After altering the yaml file, always run vagrant reload --provision so it will reset everything up and reflect your changes.

LaraLaralove
➜  vuebnb pwd
/Users/antonio/Desktop/Projects/vuebnb
➜  vuebnb ls -lha
total 856
drwxr-xr-x  29 antonio  staff   986B Jul  6 17:59 .
drwxr-xr-x   5 antonio  staff   170B Jul  6 18:00 ..
[email protected]  1 antonio  staff   8.0K Jul  6 17:59 .DS_Store
-rw-r--r--   1 antonio  staff   595B Jul  6 13:24 .env
-rw-r--r--   1 antonio  staff   544B Jul  4 18:15 .env.example
-rw-r--r--   1 antonio  staff   111B Jul  4 18:15 .gitattributes
-rw-r--r--   1 antonio  staff   234B Jul  4 18:15 .gitignore
-rw-r--r--   1 antonio  staff   5.4K Jul  4 18:15 CHANGELOG.md
-rw-r--r--   1 antonio  staff    19K Jul  4 18:15 LICENSE
drwxr-xr-x   7 antonio  staff   238B Jul  4 18:15 app
-rw-r--r--   1 antonio  staff   1.6K Jul  4 18:15 artisan
drwxr-xr-x   5 antonio  staff   170B Jul  4 18:15 bootstrap
-rw-r--r--   1 antonio  staff   1.3K Jul  4 18:15 composer.json
-rw-r--r--   1 antonio  staff   139K Jul  4 18:15 composer.lock
drwxr-xr-x  13 antonio  staff   442B Jul  4 18:15 config
drwxr-xr-x   7 antonio  staff   238B Jul  4 18:15 database
-rw-r--r--   1 antonio  staff   1.0K Jul  4 18:15 package.json
-rw-r--r--   1 antonio  staff   1.0K Jul  4 18:15 phpunit.xml
drwxr-xr-x   7 antonio  staff   238B Jul  4 18:15 public
-rw-r--r--   1 antonio  staff   3.6K Jul  4 18:15 readme.md
drwxr-xr-x   5 antonio  staff   170B Jul  4 18:15 resources
drwxr-xr-x   6 antonio  staff   204B Jul  4 18:15 routes
drwxr-xr-x   3 antonio  staff   102B Jul  4 18:15 scripts
-rw-r--r--   1 antonio  staff   563B Jul  4 18:15 server.php
drwxr-xr-x   5 antonio  staff   170B Jul  4 18:15 storage
drwxr-xr-x   6 antonio  staff   204B Jul  4 18:15 tests
drwxr-xr-x  38 antonio  staff   1.3K Jul  6 18:43 vendor
-rw-r--r--   1 antonio  staff   549B Jul  4 18:15 webpack.mix.js
-rw-r--r--   1 antonio  staff   203K Jul  4 18:15 yarn.lock

isn't it the right path? i did run vagrant reload --provision

Cronix
Cronix
2 months ago (726,250 XP)

Try just using that full path directly in the yaml file (/Users/antonio/Desktop/Projects/vuebnb) instead of the shortcut.

Please sign in or create an account to participate in this conversation.