Strict Standards: Redefining already defined constructor for class wpdb in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/wp-db.php on line 49

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/cache.php on line 36

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/cache.php on line 403

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 537

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 537

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 537

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 537

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 556

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 652

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 652

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 652

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 652

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el($output) in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/classes.php on line 677

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/query.php on line 15

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/theme.php on line 505

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/2/d88602193/htdocs/Rebecca/wp-content/plugins/simpleflickr/phpFlickr/phpFlickr.php on line 92

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/2/d88602193/htdocs/Rebecca/wp-content/plugins/simpleflickr/phpFlickr/phpFlickr.php on line 331

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/2/d88602193/htdocs/Rebecca/wp-content/plugins/simpleflickr/phpFlickr/phpFlickr.php on line 400

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/2/d88602193/htdocs/Rebecca/wp-content/plugins/simpleflickr/phpFlickr/phpFlickr.php on line 469
Rebecca’s Ramblings » 2007 » August

Archive for
Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25
August, 2007


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

Using the output of date_select


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25
Tuesday, August 28th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/formatting.php on line 75

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/formatting.php on line 82

Hmmm, after lots of time spent writing things like

item = Item.new
item.date = "#{params[:item]['date(1i)']}-#{params[:item]['date(2i)']}-#{params[:item]['date(3i)']}"

I’ve accidentally found out that Item.new(params[:item]) is clever enough to see these 3 parameters, know that they’re from a date_select, and combine them to form a date.

The Rails API for the date_select method specifies this now. I’m fairly sure it didn’t a while back…


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

Eclipse on Ubuntu gotcha


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25
Wednesday, August 22nd, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/formatting.php on line 75

I’ve finally worked out why Eclipse has been crashing with out-of-memory errors all the time since I upgraded to Ubuntu Feisty.

Before this release, I was using a version of Eclipse I had installed manually. This time, I’m using the version packaged by Ubuntu.

The application launcher provided by Ubuntu calls /usr/bin/eclipse, which is a shell script wrapping the call to /usr/lib/eclipse/eclipse (which is what actually launches Eclipse). This wrapper adds some -vmargs to the call, which means that Eclipse ignores any -vmargs you’ve specifed in your eclipse.ini file… such as the ones to increase the Java heap size so as to stop Eclipse crashing with out-of-memory errors if you’re working on a large project.

Simple solution - change the launcher to call /usr/lib/eclipse/eclipse instead of /usr/bin/eclipse.

More complicated solution available in this Ubuntu bug report.


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

Quick tip: ruby’s inject method


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25
Wednesday, August 22nd, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/formatting.php on line 75

If you’ve been using the online version of the Pickaxe book as your ruby reference, you won’t know about this very useful little method in the Enumerable module. It allows you to do something cumulative with each item in your Enumerable object.

For example, to sum prices in an array of items ordered:

order = [item0, item1, item2]
total_price = order.inject(0) {|sum, item| sum + item.price}

instead of:

order = [item0, item1, item2]
total_price = 0
order.each {|item| total_price += item.price}

Notes:

  • The method parameter is the starting value for whatever the cumulative value is - in this case, sum.
  • The first block parameter is the cumulative value, the second is the current object from the Enumerable.
  • The value returned by the statement in the block is set as the starting value for the next object from the Enumerable.

For more details, see this article on ruby arrays on thinkvitamin.com.


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25

What happens when a migration fails


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 11

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 20

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 22

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 24

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/functions.php on line 25
Friday, August 3rd, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/2/d88602193/htdocs/Rebecca/wp-includes/formatting.php on line 75

So… you’re writing a migration, you think you’ve got it right - time to try it out. You run
rake db:migrate
to apply your migration, and it doesn’t work.

Your database has some of the changes from the migration in it, and the rest aren’t there. How do you get it back into the state it was in before you attempted the migration?

You might think that
rake db:migrate VERSION=nn
(where nn is the migration number before the one that failed)
would do the job, presuming that your failed migration’s self.down method runs the statements to rollback your changes in the same order as the self.up method makes the changes.

Unfortunately, nothing happens. Rails knows it didn’t complete the migration, so has left the current schema version number as at the end of the last migration which did complete.

At this point, you are faced with opening up your database and reverting the changes that did get made manually…

There is, however, a patch in rails-trac to fix this issue - if you are using a database that supports transactions round data definition statements (such as Postgres). Once installed, your migration is wrapped in a transaction, which is rolled back if any errors occur. Yippee!