homestead.yaml file in .homestead and Homestead/src/stubs folder - laravel

My question is why is there a homestead.yaml file in .homestead folder and in the Homestead/src/stubs folder?
On my internship machine (Mac), I have been making changes to the Homestead/src/stub yaml file. On my home machine (Linux), it doesn't read those changes and I have to edit the .homestead yaml file instead.

The homestead.yml file in ./Homestead/src/stubs is there only as a placeholder before its copied to your home directory during installation. It should not be edited.
Only edit the file in ~/.homestead.
Make sure your ran the bash init.sh script on your Mac from the ./Homestead directory.
http://laravel.com/docs/5.1/homestead#first-steps

Though the Question has been answered but as it appeared while I was searching for homestead.YAML, It would be good to tell newbies that Homestead.YAML holds the whole configurations on windows and macs. It allows you to add sites, manage shared folders and much more. I will recommend this definitive guide for understanding homestead.yaml, The whole post is very long so I can't copy it
https://abbasharoon.me/homestead-yaml-explained-a-z/

Related

How to handle support files during Homebrew Formula update

I'm following the Scripts with Support Files answer from here https://stackoverflow.com/a/46479538/4771016 which works great but running into a problem during the update of my script.
If not found, my script creates an .env file for the users to pass some variables in the same directory as the .sh file lives: /home/linuxbrew/.linuxbrew/Cellar/myscript/1.0.2/libexec/.env the problem is that upon releasing a new version, the .env file won't be in the new directory i.e. /home/linuxbrew/.linuxbrew/Cellar/myscript/1.0.3/libexec/ and thus will be recreated losing the modifications.
Any ideas for keeping that .env file during updates or an acceptable design pattern for my use case? I was thinking about keeping the .env file outside that directory somewhere, but I don't know the Homebrew directory structure well enough to store it in the right place.

Homestead.test default file gives [No input file specified] Ubuntu

I just installed Ubuntu 17.10 and I want to try create a website using Laravel, but I hit a rock, I followed the instructions. step by step on the official website. But I think something is missing,
Because I haven't touch / edit anything in Homestead.yaml, so basically it would working right?
I already use vagrant up --provision. already create the ssh key. I already googled it and try several ways but it doesn't fix it, I already turn on my XAMPP as well
Sorry but I never touched Ubuntu before, so I'm very blind using this OS
Here is my Homestead.yaml file
Homestead.yaml
and the directories of /home/workspace/ and /home/workspace/Homestead/
~ Dir
Homestead Dir
my Hosts file
Hosts File
EDITED:
I just create a new project in ~/Homestead/Projects/[it goes here] because the default laravel installation is working already, so now I want to create a new project in Projects folder inside Homestead, but why it redirect the url to https?
The folders
in this screenshot: https://i.stack.imgur.com/4cxGy.png Your ~/code folder appears to not exist, which means Homestead will not map it. Create that folder in your Host OS (Ubuntu 17) and then run vagrant destroy && vagrant up If you still have issues post the entire output here for us to check.
For my last question, why when I tried to open my new projects is always giving me this error your internet connection is not private. it's because I'm using .app or .dev in the of the site name, the problem is from google chrome, so I need changed it to .test then it's working perfectly.
I got the answer from this site
https://laracasts.com/discuss/channels/laravel/chrome-blocked-localhost-with-error-your-connection-is-not-private

clion change default cache directory

Currently, for linux operating systems, the cache and index folders for clion are defaulted to /home/.Clion12/. I am on an NFS and want the cache directory and indexing directories to point to my internal ssd. Where can I change this?
I just found the answer to this. In the bin directory where clion.sh is kept, there is an ideas.properties file. You can change the default location there.
As #StevenCombs said, the file idea.properties is in the same bin directory where clion.sh is found, and the variable is idea.system.path.
I set it up like this. First, on the command line I did:
sudo mkdir -p /var/cache/mlakata
sudo chown mlakata /var/cache/mlakata
And then in the ${clioninstall}/bin/idea.properties file, I added
idea.system.path=/var/cache/mlakata/CLion/system
CLion appears to populate the CLion/system directories under my personal cache directory.
The problem was solved for me after I have created an idea.properties file in ~/.Clion2019.2/config then populated it with:
# custom CLion properties
idea.config.path=/someFolder/my_work/clion_ws/.Clion2019.2/caches/trunk-config
idea.system.path=/someFolder/my_work/clion_ws/.Clion2019.2/caches/trunk-system
idea.plugins.path=/someFolder/my_work/clion_ws/.Clion2019.2/caches/trunk-plugins
After this, the cache is build in /someFolder, not flooding my home folder anymore.
Official support page for path parameters

Issue using Vagrant SSH when vagrant.d folder is on an external exFAT drive

Setting up Vagrant for the first time and I'm using the VAGRANT_HOME environment variable to change the location of the ~/.vagrant.d folder to an external drive (I'm paranoid about SSD wear and tear, sue me). This is causing an issue with the vagrant ssh command as it's complaining about not having the right permissions and I can't use chmod to change the permissions for the file it wants on an exFAT volume.
Is there a workaround? I've checked the documentation and there doesn't seem to be a setting where I can specify a different location for the insecure key, but I might be missing something.
Thanks!
The solution is to move the insecure_private_key file located in the external vagrant.d folder to somewhere in your local home directory and then symlink it back.

Vagrant syncing process

I've just started using Vagrant and I've managed to set up a box ok it seems. I have been a little confused about syncing folders work though. I took from Vagrant that syncing allowed you to use the file system on your Mac and then sync those changes into your virtual machine, is that right?
I have these settings currently
config.vm.synced_folder "../../../Library/WebServer/Documents/", "/Users/jonnny/ubuntu-vagrant/www"
I would expect that now that when I look in chrome that inside my 127.0.0.1:1234/www/
That the files within my Library/WebServer/Documents/ would be there. But they're not, have I done it wrong or misunderstood what's going on here?
Update
I wasn't sure what you meant with my file/folder structure, so probably best I just show them.
Users
Jonnny
ubuntu-vagrant
- Vagrantfile
- /www (dir)
- bootstrap.sh
VagrantFile
VirtualBox VMs
- ubuntu-vagrant_342374982374923
- box-disk1.vmdk
- logs (dir)
- ubuntu-vagrant_342374982374923.vbox
I did try your suggestion and reload the box, but the folder still didn't seem synced.
The syntax seems to be correct. But for the second argument, /Users/jonnny/ubuntu-vagrant/www, it should be the targeted location inside the ubuntu filesystem, not the one which will be created on your Mac OS filesystem.
Try something like /www/ or /usr/johnny/www, according to the location you want.
Update
For the vagrant arguments:
the first should be the location of the folder you want to share inside your Mac Os filesystem relatively from where the Vagrantfile is in your Mac Os filesystem.
the second is where inside the ubuntu-vagrant filesystem you want to access these files.
I think your folder structure is not good: you dont need a Vagrantfile folder or a www folder in your Mac OS filesystem. Just consider one folder: the one where the Vagrantfile is, Users/Johhny/ubuntu-vagrant. The www folder will just exists inside the VM. Then if the Library folder is at the same level than the Users folder in your Mac OS filesystem, you should have :
Library
...
Users
Johhny
ubuntu-vagrant
Vagrantfile
bootstrap.sh
And inside the Vagrantfile you should have this line :
config.vm.synced_folder "../../../Library/WebServer/Documents/", "/www", create: true
According to the doc, for the create: true paramater : If true, the host path will be created if it does not exist. Defaults to false.

Resources