Customer Login
  • New Server
  • Stevenson Software is pleased to announce the latest addition to their family. It's a brand new Supermicro Dual Core, Dual Xeon 2.6ghz server. This baby has a 3ware Raid card and 8gb of ram. It's open for business - if you signup today, you'll most likely be placed onto this server.

  • Posted 7:44am 20-Jun-2007 by dave
  • Installing Rails
  • Here's a few commands that I use to get a Rails site up and running quickly on a SilverRack VPS: (NOTE: view source of the page to see the real source of the configuration files)
    rpm --import
    vi /etc/yum.repos.d/utterramblings.repo
    name=Jason’s Utter Ramblings Repo
    yum -y install gcc openssl-devel mod_perl-devel mod_python mod_ssl mod_dav_svn mysql-server mysql-devel libpng-devel libjpeg-devel libtiff-devel freetype-devel ghostscript-devel which
    yum update
    rpm -i webmin-1.350-1.noarch.rpm
    tar -xzvf ruby-1.8.6.tar.gz
    cd ruby-1.8.6
    ./configure && make && make install
    cd ..
    tar -xzvf rubygems-0.9.4.tgz
    cd rubygems-0.9.4
    ruby setup.rb
    cd ..
    rm -rf ruby-1.8.6 && rm -rf rubygems-0.9.4
    tar -xzvf ImageMagick.tar.gz
    cd ImageMagick-6.3.6/
    ./configure && make && make install
    cd ..
    rm -rf ImageMagick-6.3.6
    vi /etc/
    add /usr/local/lib on a newline
    ldconfig -v
    gem install rmagick or RMagick
    gem install rails mongrel mongrel_cluster --include-dependencies --no-rdoc --no-ri
    (the above sometimes fails - try it again and it usually works the second time)
    gem install mysql 
    (let it fail)
    cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7
    ruby extconf.rb --with-mysql-config=/usr/bin/mysql_config
    make && make install 
    from gem directory
    cd /etc/httpd/conf.d
    vi vhost.conf
      DocumentRoot /var/www/your_app/current/public
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
      # Configure the cluster member proxy
      RewriteEngine On
      # If there is a maintenence.html file in your
      # public dir all requests will get rerouted to
      # this file.  This is for use with capistrano
      RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
      RewriteCond %{SCRIPT_FILENAME} !maintenance.html
      RewriteRule ^.*$ /maintenance.html [L]
      # Rewrite index to check for static index.html
      RewriteRule ^/$ /index.html [QSA] 
      # Rewrite to check for Rails cached pages with .html extentions
      RewriteRule ^([^.]+)$ $1.html [QSA]
      # All dynamic requests get sent to the cluster
      RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
      # tell all requests that begin with /svn to not go to the cluster.  this will
      # enable you to run subversion from the same url... just make sure
      # the subversion path starts with /svn and you also don't name any controllers
      # svn
      RewriteCond %{REQUEST_URI} !^/svn	
      RewriteRule ^/(.*)$ balancer://your_app_cluster%{REQUEST_URI} [P,QSA,L]
      # Deflate for clients that support it.
      AddOutputFilterByType DEFLATE text/html text/plain text/xml
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      # Error and access logs.
      ErrorLog logs/your_app_error_log
      CustomLog logs/your_access_log combined
    cd /var/www
    rails your_app
    mkdir /home/t
    cp -r your_app /home/t
    cd your_app
    rm -rf *
    mkdir current
    cd current
    cp -r /home/t/* .
    mongrel_rails cluster::configure -e production -p 5000 -N 2 -c /var/www/your_app/current -a
    apachectl restart
    mongrel_rails cluster::restart
    $ htpasswd -cm /etc/svn-auth-file user
    New password: password
    Re-type new password: password
    mkdir /var/www/svn
    cd /var/www/svn
    svnadmin create your_app
    chown -R apache.apache your_app
    vi /etc/httpd/conf.d/subversion.conf
      DAV svn
      SVNParentPath /var/svn
      AuthType Basic
      AuthName "Subversion repository"
      AuthUserFile /etc/svn-auth-file
      Require valid-user
  • Posted 8:45pm 15-Jun-2007 by dave