This section describes how to develop Rails applications using Wazaterm.
I will explain how to use it from an iPad in another article. This time, I will explain how to use it from Mac.
Start Wazaterm by referring to this article.
Install ruby by using rbenv tool.
# sudo apt install rbenv $ rbenv install $ ~/.rbenv/bin/rbenv init $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc $ rbenv install -L | less # check version $ rbenv install 3.0.3 # install supported ones $ ruby -v # check version
$ gem install rails $ rails new my_project
The default port of the development server is 3000, but Wazaterm opens 3000, so if you want to use SSH port forwarding, start the server on a port other than 3000 or 5000. In this example, the port number is 8000. (see Available ports for Wazaterm for more details)
$ cd my_project $ rails server -p 8000
$ autossh -M 50100 -NT -o "ServerAliveInterval 60" -o TCPKeepAlive=yes -o "ServerAliveCountMax 120" -L 8000:localhost:8000 email@example.com &
The idea is the same, so Windows will use WSL (Windows Subsystem for Linux) and ChromeOS will use Crostini with the Unix that comes with the OS
Enter localhost:8000 in your browser and you will see the first page. From here, you can use the CLI editor or VS Code to develop.