Ruby (on Rails)

I've been using Ruby on Rails for a few years, in my spare time, and hope to keep working with it whenever the opportunity arises. A couple of college friends and I created hospitalpages.ie which is was developed using Ruby on Rails, Git and Capistrano for deployment. I also hope to dabble more in pure Ruby scripting, to date I've used it for automating data insertion with MySQL and some file parsing.

Rake fun and killing dispatch.fcgi

A few rake commands I use a lot.

Of course "rake -h" is your best friend also.

  • rake -T Display the tasks (matching optional PATTERN) with descriptions, then exit.
  • rake -v Log message to standard output.
  • rake -V Display the program version.
  • rake -n Do a dry run without executing actions.

From time to time you make changes and need to restart your application server, e.g. you've updated your routes.rb file. If you are using dispatch.fcgi run:

pkill -9 -u username dispatch.fcgi

alternatively you can run:

touch environment.rb

both assume you have SSH access to the server, which most good hosts will provide. hostingrails.com provide SSH access as standard.

blog comments powered by Disqus