Archive for the ‘rails production’ Category
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
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
Monday, June 18th, 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
This is the second time now that this has had me tearing my hair out. Last time, I couldn’t work out how to get rake db:migrate to operate on the production database. After a while on Google, I managed to find:
%> rake --require=config/environment.rb db:migrate
It worked like a treat, even on the Windows server my app’s deployed on (though with \ as the path separator, not /).
Until now, that is.
I’ve just switched to using the paginating_find plugin for paging result sets, as it allows me to use all the find options, unlike the rails default pagination. It works fine in both development and production, and rake is happy in development mode. It doesn’t like the command above, though, if you happen to call the find method in your migration. For some bizarre reason, the find method aliasing goes wrong, and you get an infinite loop. The overwritten find method is supposed to call the original find method, but ends up calling itself recursively instead.
Back to Google… nothing on this problem that I could find.
Rethink: it must be something with the way production mode is specified, since it’s only a problem when running rake like this.
Back to Google again: this time to look for alternative methods to specify that rake should use the production environment. Finally found a way, thanks to a post on a TextDrive forum:
%> RAILS_ENV=production rake db:migrate
That solves the problem on Linux, how about on Windows?
%> set RAILS_ENV=production
%> rake db:migrate
Sorted!
Posted in Rails, rake, rails production | 4 Comments »