Search code examples
ruby-on-railsbashthin

Can't start thin server from bash script


I'm trying to start my Rails app with thin from the shell script. If I run the commands manually, everything works fine, but if I run the script, it just won't work.

#!/bin/bash
cd /path/to/my/project_1
thin -e production -p 3000 --daemonize -s 10 start
cd /path/to/my/project_2
thin -e production -p 3010 --daemonize -s 10 start

What am I doing wrong? Thanks.


Solution

  • This question was solved in the comments, but for posterity’s sake:

    Make sure you have execute permission on the script. chmod 755 my_awesome_script ought to do it.