'ruby on rails' Category

  • Sep
    08
    2009

    Query Reviewer & Log4r

    I recently found a very neat plugin called Query Reviewer for visualizing slow sql queries in your rails app. When I installed it, I saw this error message
    NoMethodError: undefined method `silence‘ for #<Log4r::Logger:0×39593f8>
    You will see this error if you are using log4r for logging instead of the default rails logger. This ticket also talks of [...]

  • May
    06
    2009

    Rails 2.3 routing gotcha with :format

    I recently upgraded Muziboo to Rails 2.3 and found out that some of my routes were broken. On digging deeper I found out that I had some routes with two version, one without :format and one with :format going to different controllers/actions. I had the route with :format before the route without :format in the [...]

  • Mar
    21
    2009

    Ferret to Sphinx: Part 1 – Why and how to integrate it with acts_as_taggable

    I am currently working on moving Muziboo’s search from ferret to sphinx. We were using acts_as_ferret (AAF) plugin which provides a very simple rails integration with ferret. AAF binds itself to the active record callbacks and makes index updation painless. However AAF is pretty unstable in production mode and we realized this only lately with [...]

  • Jun
    17
    2008

    Attachment_fu sanitize filename, Regex and Unicode gotcha

    Attachment_fu sanitizes the filenames on uploads to remove any funky character (not 0-9 a-z A-Z, underscore or a period). This is accomplished by the sanitize_filename private method in attachment_fu.rb file

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    def sanitize_filename(filename)
    returning filename.strip do |name|
    # NOTE: File.basename doesn’t work right with Windows paths on Unix
    # get [...]

  • Jun
    14
    2008

    Gateway timeout with haproxy on long requests

    I was trying to make a payment using PayPal SOAP API today and on a standard rubyworks installation (Apache –> HAProxy –> Mongrels), I was getting a Gateway Timeout Error. On checking the logs, I found out that the payment was in fact going through and rails was generating the thanks page too. My first [...]

 
Powered by Wordpress and MySQL. Theme by openark.org