• Jun
    17
    2008

    Audio File Handling in Ruby

    Share
    Last few days I have been looking to handling different audio format uploads in Muziboo. We currently support only mp3 files but I see a lot of wma and m4a uploads being attempted. FFMPEG can convert these files easily to mp3 but the real issue is in validating uploads and then finding out when to [...]

  • Jun
    17
    2008

    Attachment_fu sanitize filename, Regex and Unicode gotcha

    Share
    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

    Setting up DNS hosting for your VPS

    Share
    If you are moving from shared hosting to VPS, you will have to setup DNS yourself. In case you want to run DNS on your VPS, you need to have atleast 2 IP addresses. My host, vpsfarm.com gives only one IP address. Also I wanted to outsource the DNS work to someone who understands it [...]

  • Jun
    14
    2008

    Gateway timeout with haproxy on long requests

    Share
    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 [...]

  • Jun
    12
    2008

    s3sync yml file gotcha

    Share
    s3sync is a nice ruby utility for backing up data on s3. It works much like rsync (but not completely like it). There are several way to configure the keys but if you are using the yml approach, you need to watchout for this little gotcha
    If you are specifying the aws access key and secret [...]

  • Jun
    07
    2008

    Mongrel Upload Progress Gotcha

    Share
    Mongrel Upload Progress plugin is an awesome thing if you want to show upload progress bars. I have been using the plugin for about a year now to track progress of song uploads. However recently I wanted to track progress of reuploads and therefore started looking into tracking more than one action. Turns out that [...]

 
Powered by Wordpress and MySQL. Theme by openark.org