Skip to content

Small wrapper to run puma on VPS without RVM pathing errors

Notifications You must be signed in to change notification settings

otthe/puma-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

puma-wrapper

RVM wrapper + instructions to boot puma web server on correct environment without unwanted encounters

  1. add the script to correct location
/usr/local/bin/puma_wrapper/start_puma.sh
  1. make it executable
sudo chmod +x /usr/local/bin/puma_wrapper/start_puma.sh
  1. go to sys daemon
sudo nano /etc/systemd/system/puma.service
  1. it should look something like this (make sure user groups and paths are correct)
[Unit]
Description=Puma HTTP Server
After=network.target

[Service]
User=puma
Group=puma
WorkingDirectory=/var/www/my-app
ExecStart=/usr/local/bin/puma_wrapper/start_puma.sh
Restart=always

[Install]
WantedBy=multi-user.target
  1. reload systemd and puma service
sudo systemctl daemon-reload

sudo systemctl restart puma
sudo systemctl status puma
  1. verify that there are no errors
sudo systemctl status puma
  1. make sure to allow traffic on correct port
sudo ufw status
sudo ufw allow your_port_number
sudo ufw reload
  1. ADDITIONAL: debugging potential errors:
journalctl -u puma.service

# check nginx / apache error logs
sudo tail -f /var/log/nginx/error.log

About

Small wrapper to run puma on VPS without RVM pathing errors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages