Skip to content

{ Category Archives } Ruby

learning Ruby

Fixtures and has_one in Ruby on Rails

In Rails 2.0, fixtures has been improved.  You no longer need to specify ID.  You can check out the screencast.  unfortunately, it does not support the has_one (as far as I can tell). I have a location object that specifies a phone number, a name, and an address object.  It is specified as follows: class [...]

Creating and deploying a Rails app

This documents how I create Ruby on Rails applications and deploy them to my server.  I have created a bare bones apache web server that hosts ruby applications using MySQL.  It also assumes you have Ruby on Rails set up on a Macbook Pro. Server Side User mkdir ~/myrumbleapp mkdir ~/myrumbleapp/www mkdir ~/myrumbleapp/www/current mkdir ~/myrumbleapp/logs [...]

Bare Ubuntu configuration for Ruby on Rails

General Install Ubuntu 9.1 server using the Bare Server option The first thing I like to do is add my account to the /etc/sudoers file. This just guarantees that I can always use sudo, even if I mistakenly mess up my group assignment. sudo visudo # /etc/sudoers root ALL=(ALL) ALL user ALL=(ALL) ALL user should [...]

Install Ruby on Rails for Mac Snow Leopard using MacPorts

Not sure why but I had a heck of a time running my ruby on rails code after updating my Mac to Snow Leopard. I use MacPorts to do my development so I simply removed it and all of my ports as well as the gem I had installed in my home folder.  I went [...]