I'm the bigfan of gorails.com website and I'm using for the past 5 years. It helps me to setup Ruby on Rails locally either on Windows or Ubuntu.
For Vagrant, I'm following this article to setup it with Ruby on Rails: https://gorails.com/guides/using-vagrant-for-rails-development
There is multiple when following those article. Hence, I decided to configure it manually where Vagrant only works as ruby interpreter and PostgreSQL installed on the host operating system.
The base can created with vagrant init
execution.
Just point to IP Address where usually displayed upon first vagrant ssh
access. Or we may execute as follows. Usually it is: 10.0.2.2:
$ ip r
Sometimes I occasionally do some PHP development. Hence, I want PHP too. In Vagrantfile
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y apache2 php libapache2-mod-php php-mysql php-pgsql
SHELL
I need to bind the address to 0.0.0.0
and set port forwarding in Vagrantfile
.
$ rails server -b 0.0.0.0
config.vm.network "forwarded_port", guest: 3000, host: 8081
I'm using Windows 11 and so far I'm happy with new Terminal provided by Windows. However, I'm interested in Cmder too.
I define the synched folder in Vagrantfile
:
config.vm.synced_folder "/var/www/sendiri.com", "/var/www/html/a"
I'm using ubuntu/jammy64.
I'm using plugin to allow larger size of disk instead of default 40GB
vagrant plugin install vagrant-disksize
This gist ignored~