Install Ubuntu Server Download an image from this site Select File > New… to and follow the instructions, choose the .iso...

ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...

Sometimes you need to dynamically load an image and do something as soon as its loaded (when for example its...

When you click a link or a press a button on a Selenium-controlled browser, the call will return control...

When you set both a record's association and that association's foreign key attribute, Rails does not realize you...

On 32bit systems, the maximum representable Time is 2038-01-19 03:14:07 in UTC or 2038-01-19...

Have a backup. Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to...

getfirebug.com

You know Firebug as a Firefox extension but there is also a "Lite" version which runs purely off JavaScript.

This might be due to AppArmor denying the MySQL server access to most of the filesystem. You can instead use...

From time to time we're convinced that an error must be very close to the network card, OS IP...

If you're on Ubuntu: sudo apt-get install ruby-dev On other platforms: Look for a package containing ruby...

imperialviolet.org

In January this year (2010), Gmail switched to using HTTPS for everything by default. Previously it had been introduced as...

gurge.com

How to write to the db 27,000 times in 24 seconds instead of 9 minutes.

When you eagerly load an association list using the .include option, and at the same time have a .where on...

You can get YAML.load to instantiate any Ruby object by embedding the desired class name into the YAML code. E.g...

After switching to Rails 3 you may get a LoadError with the following message when trying to use your application...

Note: We are talking about Machinist 1 here, Machinist 2 may have solved this or might require a different approach...

Cucumber step argument transforms can be a powerful way to make your steps more flexible. Note however that if your...

First of all: You could just use RVM which would make the pain go away. If for some reason you...

When you load a record with find options that have SQL fragments in :select or :joins, ActiveRecord will make that...

Rails 3, 4, 5, 6 config/application.rb config/environment.rb before the initialize! call (we don't usually edit this file)

makandra dev

This may be awkward to set up, but will work once you're done. Fun facts:

makandra dev

Dir.glob(File.join RAILS_ROOT, 'app', 'models', '*.rb').collect{ |path| path[/.+\/(.+).rb/,1] }.collect(&:camelize).collect(&:constantize)

install apache sudo apt-get install ruby1.8-dev sudo gem install passenger sudo passenger-install-apache2-module follow the instructions