Este guia irá te ensinar a construir uma aplicação de chat multi-usuário, simples mas totalmente funcional, usando as funcionalidades em tempo real do Rails 8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker volume create n8n_data | |
| docker run -it --rm \ | |
| --name n8n \ | |
| -p 5678:5678 \ | |
| -e GENERIC_TIMEZONE="America/Porto_Velho" \ | |
| -e TZ="America/Porto_Velho" \ | |
| -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \ | |
| -e N8N_RUNNERS_ENABLED=true \ | |
| -v n8n_data:/home/node/.n8n \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #--------------------------------------------------------------------------------------- | |
| # Script to Install Docker Engine on Ubuntu | |
| # Source: https://gist.github.com/alexishida/269ae3891657e2c0bd8c25ad4d65ee6f | |
| # | |
| # Author: Alex Ishida <alexishida@gmail.com> | |
| # Version: 1.0.0 - 21/10/2025 | |
| # | |
| # References: | |
| # https://docs.docker.com/engine/install/ubuntu/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #--------------------------------------------------------------------------------------- | |
| # Script to install rbenv, Ruby, nodejs and yarn | |
| # Source: https://gist.github.com/alexishida/655fb139c759393ae5fe47dacd163f99 | |
| # | |
| # Author: Alex Ishida <alexishida@gmail.com> | |
| # Version: 1.7.3 - 21/10/2025 | |
| #--------------------------------------------------------------------------------------- | |
| # | |
| # HOW TO INSTALL A SCRIPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SCRIPT_USER=$SUDO_USER | |
| # Checking if script running with sudo | |
| if [[ $(id -u) -ne 0 ]] | |
| then echo "Please run with sudo ..." | |
| exit 1 | |
| fi | |
| rm -fr /usr/local/rbenv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Definiro o ZSH como terminal padrao | |
| chsh -s $(which zsh) | |
| # Symbolic Link | |
| ln -s <source> <target> | |
| # Ubuntu configure locale e timezone | |
| sudo dpkg-reconfigure locales | |
| sudo dpkg-reconfigure tzdata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -------- DVR e Mibo Smart Intelbras ------------------------------------------------------- | |
| rtsp://usuário:senha@ip:porta/cam/realmonitor?channel=1&subtype=0 | |
| Ps minha mibo smart im4c só funcionou com esse link: | |
| rtsp://admin:chave de acesso@ip:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif | |
| -------- Luxvision ------------------------------------------------------- | |
| rtsp://ip:porta/user=[usuário]&password=[senha]&channel=1&stream=0.sdp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #--------------------------------------------------------------------------------------- | |
| # Script to update rbenv, Ruby and Ruby on Rails versions | |
| # Source: https://gist.github.com/alexishida/015b074ae54e1c7101335a2a63518924 | |
| # | |
| # Author: Alex Ishida <alexishida@gmail.com> | |
| # Version: 1.7.2 - 17/10/2025 | |
| #--------------------------------------------------------------------------------------- | |
| # | |
| # If you want install rbenv for the first time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # MariaDB | |
| docker run -d \ | |
| --name=mariadb \ | |
| --restart=always \ | |
| -v /etc/localtime:/etc/localtime:ro \ | |
| -e MYSQL_ROOT_PASSWORD=senha \ | |
| -v /storage/mariadb:/var/lib/mysql \ | |
| mariadb:latest | |
| # PhpmyAdmin |
This guide will walk you through adding a ChatGPT-like messaging stream to your Ruby on Rails 7 app using ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind. All code included below!
Want more content like this, for free? Check out my free book, RailsAI!
- Follow me on Twitter for more Ruby AI at https://twitter.com/alexrudall
- Released under the MIT License - use as you wish :)
NewerOlder
