|
|
Thursday, September 10

"YYYY-MM-DD 24:00:00".to_time ouch
by
ep
on Thu 10 Sep 2009 03:22 PM EDT
Be aware of the bug in Rails ActiveSupport String.to_time method
(rdb:1) "2009-09-10 24:00:00".to_time - "2009-09-10 00:00:00".to_time
TypeError Exception: expected numeric or date
(rdb:1) "2009-09-10 24:00:00".to_time.to_time - "2009-09-10 00:00:00".to_time
86400.0
(rdb:1) p "2009-09-10 24:00:00".to_time.class
DateTime
(rdb:1) p "2009-09-10 00:00:00".to_time.class
Time
(rdb:1)
more »
Monday, July 20

FasterCSV and development mode in Rails 2.3, Rack and Passenger
by
ep
on Mon 20 Jul 2009 03:15 PM EDT
Using Proc as a response you pass from the controller sometimes causes 500 error. It happens to be the nature of the Rack/Rails life cycle. Before response was sent/called before Dependencies cleanup in Rails, because it was part of the flow on request-response processing. Now with Rack in front of Rails, the Proc is not called in the request-response flow of the Rails, but in the Rack after Rails finished and if you happens to use Model classes inside the Proc, then you may get empty or partial response and some errors in Apache error logs more »
Tuesday, May 19

Rails 2.3, Rack and FasterCSV
by
ep
on Tue 19 May 2009 05:20 PM EDT
With recent update to Rails 2.3 we found that we cant' strem CSV with FasterCSV anymore
more »
Monday, April 27

Re: process hangs - (Errno::ESPIPE) "Illegal seek" rails + passenger
by
ep
on Mon 27 Apr 2009 05:59 PM EDT
With a recent upgrade to passenger to 2.0.6 ESPIPE come back again. Another patch ...
more »
Wednesday, March 4
by
ep
on Wed 04 Mar 2009 02:15 PM EST
it has a bug or feature in it. yeilding inside with_scope will put scope on the same class
migration
class ...
more »
Thursday, January 22

MONKEYS FOR SALE
by
ep
on Thu 22 Jan 2009 11:10 AM EST
Once upon a time a man appeared in a village and announced to the
villagers that he would buy monkeys for $10 each. ... more »
Friday, January 9

ROR: Migrations, fixtures, test, mysql and Mysql::Error Duplicate entry
by
ep
on Fri 09 Jan 2009 10:52 AM EST
Few days ago we upgraded our test server with mysql 5.1.30 (before we had 5.0.27) and tests started to fail. ... more »
Tuesday, October 14

process hangs - (Errno::ESPIPE) "Illegal seek" rails + passenger
by
ep
on Tue 14 Oct 2008 01:20 PM EDT
In our application we have the problem with high CPU load and hang process when upload of the file failed ... more »
Tuesday, September 2

O-ops 'display' in Ruby
by
ep
on Tue 02 Sep 2008 04:11 PM EDT
Today I have discovered a big oops I'd made when called column 'display' in our model. It turns out default ... more »
Thursday, August 14

Passenger (mod_rails) for development. restart and debug
by
ep
on Thu 14 Aug 2008 01:04 PM EDT
rdebug with Phusion Passenger more »
Wednesday, July 30

self-inflicted DOS attack with javascript or why routing errors should be logged without stack trace
by
ep
on Wed 30 Jul 2008 03:39 PM EDT
Today we had an interesting experience. During the the deployment one of the server start showing a lot of errors ... more »
Tuesday, July 29

Tile Watermarking with RMagick
by
ep
on Tue 29 Jul 2008 03:34 PM EDT
Tile watermarking of an image with RMagick more »
Tuesday, July 22

Google Map API suprise
by
ep
on Tue 22 Jul 2008 10:41 AM EDT
Not well formed XML in Google MAP geocoding result more »
Wednesday, May 14

vCard, Vpim, Version 3.0 and =0D=OA=
by
ep
on Wed 14 May 2008 11:27 AM EDT
Vpim::InvalidEncodingError: ... =OD=0A= when parsing vcf files in ruby ... more »
Tuesday, May 13

Memory Leaks in Rails
by
ep
on Tue 13 May 2008 06:23 PM EDT
Well, it is not leaks, it's just the way how Ruby and Rails works. The problem in templates , Proc, GC and scope. Read more ... more »
Friday, May 9

Back from UTF8 for CSV in Ruby on Rails
by
ep
on Fri 09 May 2008 12:45 PM EDT
Rails taking care for your to handle UTF-8. How about when you need to generate a CSV file? It can't be UTF-8. It has to be one of the localized encodings. There is no javascript way to know what is a default locale on the windows client. You may assume it based on your major audience location, (still wrong assumption). ... more »
Monday, March 17

YAML bug with unpleasant side effect in ActiveRecord :serialize
by
ep
on Mon 17 Mar 2008 02:36 PM EDT
Just demo
$ irb
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> YAML.load(YAML.dump("\n New Paragraph\nNew Line"))
ArgumentError: syntax error on line 3, ...
more »
Monday, March 3

Impersonating scam from hijacked gmail account
by
ep
on Mon 03 Mar 2008 11:57 PM EST
Gmail account of one of my friends got hijacked
and pretty much the same minute all her contacts from contact ... more »
Tuesday, February 5

Another 'work/sales' representative scam
by
ep
on Tue 05 Feb 2008 10:10 AM EST
Another 'work/sales' representative scam. Turkish company with email address on Spanish Yahoo. Apparently Finland, Cyprus and UK is not part ... more »
Monday, February 4

Russian "Nigerian Scam"
by
ep
on Mon 04 Feb 2008 09:47 PM EST
I would never thought that russian OLIGARH'IE name will be used in the old-old scam
To: (Recipient List Suppressed)
Sender: ... more »
Saturday, February 2

Re: New Scam: SINOSTEEL TRADING
by
ep
on Sat 02 Feb 2008 12:55 PM EST
REF:KIR/02.
Dear Sir/Madam,
We avail ourselves of this opportunity to approach you for the
establishment of business relations with you. We are presently
searching for Representatives/Collection Agents who can help us
establish a medium of getting to our customers in the America,
precisely USA and Canada. If interested, Please contact us via email;
for more information. ...
more »
Thursday, December 6

ActiveMerchant, PayPal, SuccessWithWarning and alias_method_chain
by
ep
on Thu 06 Dec 2007 03:40 PM EST
ActiveMerchant Paypal gateway doesn't like 'SuccessWithWarning' from Paypal. How to handle it and save your face (or your website face) more »
Wednesday, November 28

New Scam (and possible Identity theft) from pretend to be "Hartman International Co. Ltd"
by
ep
on Wed 28 Nov 2007 09:56 PM EST
The scammers and identity thefts becoming more sophisticated. That email came through google spam check and spamassassin I run locally. more »
Monday, November 26

How to stop big file upload (Enemy at the gate) with Apache mod_rewrite
by
ep
on Mon 26 Nov 2007 07:02 PM EST
Stop big file upload before it hits your application server
- Apache 2
- ModRewrite
- Ruby on Rails
When you have a form to upload a file, you may want to limit the ... more »
Wednesday, November 21

Scam with elements of social engineering. Be aware
by
ep
on Wed 21 Nov 2007 09:12 AM EST
Scam with
elements of social engineering.
How scammers using craigslist to fool you, mislead and deceive you ... more »
Sunday, November 11

Unobtrusive way to retry curl/curb based screen scraping function on Curl::Err::Error
by
ep
on Sun 11 Nov 2007 07:30 PM EST
Curl retry easy with alias_method_chain ... more »
Friday, October 26

Ruby on rails debug shell script helper
by
ep
on Fri 26 Oct 2007 09:25 AM EDT
Some time you need a debugger with ability to step-by-step execution, inspection and evaluation, not just watch. I use small shell script to achieve this #!/bin/sh mongrel-cluster stop sleep 5 cd $ROR_HOME /usr/bin/xterm -e "rdebug -n -- ./script/server -p 4001" & /usr/bin/xterm -e "rdebug -n -- ./script/server -p 4002" & /usr/bin/xterm -e "rdebug -n -- ./script/server -p 4003" & The server will stop execution right at the line debugger if defined? Debugger
Monday, October 22

Safari "upload file" with 'unknown' content-type and Rails
by
ep
on Mon 22 Oct 2007 01:22 PM EDT
I don't know how Safari identifies a content-type for the file before it uploaded
(extension or magic bit). But when it failed to identify it - nothing is passed to
server
Example upload CSV file from Safari on Windows ... more »
Friday, October 12

UTF-8, vCard and Ruby or how to alias class method
by
ep
on Fri 12 Oct 2007 10:27 PM EDT
I need to parse uploaded vCard (vcf) file for one of the project,
I am working on. There is not that many libraries for Ruby around there. Well, actually there is only one - vpim
Everything was working just fine with test files I found on the Internet, until I hit the wall with vcf from
Apple Address book. Few surprises: accent characters or non US ASCII in general
plus EMAIL and TEL without a value ... more »
Thursday, July 19

Simple way to get around ticket 3096
by
ep
on Thu 19 Jul 2007 02:08 PM EDT
You need to render partial with a collection of hashes (or kind_of?). Probably you control the code, which generate the collection ... more »
|