Changing WeBrick Server Root

Posted by Andrew Cetinick on July 30th, 2008

Recently I needed to change my WeBrick’s application root from /public to something else.  If you need to have it running under a different directory, all of your routing to public stylesheets, images, etc. will have errors.

Read the rest of this entry »

Debugging Rails with Netbeans

Posted by Andrew Cetinick on July 15th, 2008

Here’s how you can setup debugging with your Ruby environment using Netbeans 6.1. Netbeans 6.1 comes with a debugger installed, but only with JRuby, this is how to set it up to work with Ruby.

Read the rest of this entry »

Adding Rating to Your Models

Posted by Andrew Cetinick on July 1st, 2008

In this tutorial I will show you how to add ratings to your models by using the acts_as_rateable plugin in Ruby on Rails. This plugin makes ActiveRecord models rateable through a polymorphic association and optionally logs which user rated which model.

Read the rest of this entry »

Creating an Administration Back-end for Rails

Posted by Andrew Cetinick on June 24th, 2008

One of the most important parts of web development is building an administration back-end for your data, a place that is secure from the rest of your application where you can administrate users, topics, categories, or whatever you need for your website. But how do you do it in Ruby on Rails? Where do my controllers go? I will show you a simple way of creating an administration back-end for your Rails application.

Read the rest of this entry »

Ruby on Rails Database Setup Tutorial

Posted by Andrew Cetinick on June 24th, 2008

Ruby on Rails supports many different type of databases. How do you setup Ruby on Rails with your database? Here are some examples to help you out.

Read the rest of this entry »

Ruby Gems 1.2.0 released

Posted by Andrew Cetinick on June 23rd, 2008

New version of Ruby Gems has been released. The new version is said to fix problems with ‘gem install’ hogging up your system’s memory.

Upgrade using the command:

sudo gem update --system

Read the rest of this entry »

Ruby on Rails Dynamic Finders

Posted by Andrew Cetinick on June 19th, 2008

Ruby on Rails is designed to achieve more with less code. A perfect example of this is its use of Dynamic Finders.

Read the rest of this entry »

Ruby on Rails one-to-one Tutorial

Posted by Andrew Cetinick on June 17th, 2008

In this tutorial I will show you how to create a one-to-one relationship in Ruby on Rails. There are some cases you will need to use a one-to-one relationship, where one record in table A has a record in table B and vice versa.

Related: Ruby on Rails one-to-many Tutorial
Related: Ruby on Rails many-to-many Tutorial

Read the rest of this entry »

Ruby on Rails one-to-many Tutorial

Posted by Andrew Cetinick on June 17th, 2008

This tutorial covers the basics of implementing a one-to-many relationship in Ruby on Rails. There are many options available to you when creating this relationship. You should be aware of these, and I will cover a few of the important ones. I will also show you some of the methods Rails gives you access to in the relationship.

Related: Ruby on Rails many-to-many Tutorial
Related: Ruby on Rails one-to-one Tutorial

Read the rest of this entry »

Ajax search in Rails

Posted by Andrew Cetinick on June 16th, 2008

Ajax is a must these days for websites. It is used in almost all applications and in many cases is used for the wrong reasons. One of those cases is however used for the right reason, Ajax search.

In this tutorial I will be using the acts_as_ferret plugin to implement Ajax search into your view to return similar titles of posts. If you are unfamiliar with acts_as_ferret please read my acts_as_ferret Tutorial post to setup the plugin for you models.

Read the rest of this entry »


Copyright © 2008 Jumbabox. All rights reserved.