29
Sep

Create Rails Test Application (with everything) Recipe

   Posted by: abdallah   in Coding, Work

Here’s a quick recipe for setting up a rails app with the needed mongrels and such

  1. #!/bin/bash
  2. echo "Please enter domain name: ";read DOMAIN
  3. adduser $DOMAIN; passwd $DOMAIN
  4. mkdir /home/$DOMAIN/htdocs/
  5. cd /home/$DOMAIN
  6. su - $DOMAIN -c ‘rails test’
  7. cd /home/$DOMAIN/test
  8. echo "Existing mongrels: "
  9. netstat -tlnp | grep ruby
  10. echo "Please enter port to use: "; read PORT
  11. echo "How many mongrels: "; read MONGRELS
  12. cd /home/$DOMAIN/test/
  13. mongrel_rails cluster::configure -e production -p $PORT -a 127.0.0.1 -N $MONGRELS -c /home/$DOMAIN/test/
  14. ln -s /home/$DOMAIN/test/config/mongrel_cluster.yml /etc/mongrel_cluster/$DOMAIN.yml
This entry was posted on Monday, September 29th, 2008 at 12:10 pm and is filed under Coding, Work. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

You must be logged in to post a comment.