Installing Ruby on Rails 3, MySQL, Git, Ruby Enterprise Edition, Passenger (Mod_Rails) on Ubuntu with Rackspace Cloud.
Short and sweet. Here all the commands I run in this order to set up a brand new box. It usually takes about 10 - 15 minutes on a 256 MB RAM instance. Compiling Ruby Enterprise Edition, which is super easy, will take the most amount of time. It will seem ...
Written by Sean Behan on 06/17/2012
Nesting Resources in Rails Routes.Rb with Namespaces
When I have a controller that takes more than one has_many argument, I think about creating a namespace. This way I may still use my forums, pages controllers w/out needing any conditional logic, testing for the presence of :course_id in the params hash. ...
Written by Sean Behan on 06/17/2012
Why are PHP5 Namespaces Defined Using a Backslash?
Why are PHP namespaces defined using a backslash? It looks ugly. Unless of course, there is a good reason for the "\"? Does this namespaced code run more efficiently on Windows? Since namespaces are new in PHP5 why not take the opportunity to use them wh...
Written by Sean Behan on 06/17/2012
Disk Usage Information on Mac OS X
Get disk usage information about the Desktop $ du -h -d 0 Desktop 14G Desktop Information about how much free space is available on computer $ df -lh Filesystem Size Used Avail Capacity Mounted on /dev/disk0s2 111Gi 109Gi 2.3Gi 98% / ...
Written by Sean Behan on 06/17/2012
Namespacing in Rails
With namespace routes in Rails you can easily create a prefix for select resources. For instance, if you have an admin area or an account dashboard you can give logged in users access to methods that are not otherwise available. To use namespaces define t...
Written by Sean Behan on 06/17/2012