Rewrite start.sh in ruby