All posts by Morshed Alam

Issues with thinking sphinx

I recently faced some issues with thinking sphinx which sharing here so that it helps others. Has many association not working: I had a model named User which has many tracks and the very basic index definition is as follows: ThinkingSphinx::Index.define :track, :with => :active_record do indexes title indexes [artist.first_name, artist.last_name], :as => :artist_name, :sortable…

Read More

Dirty checking to warn for unsaved changes using jQuery

Copy following code snippet into the application. dirtyCount() method return the number of fields have unsaved changes. var dirtyChecking = function () { $(‘input, select, textarea’).each(function () { var ele = $(this); ele.attr(‘data-old’, ele.val()); // Look for changes in the value ele.on(“change keyup paste click”, function (event) { if (ele.attr(‘data-old’) != ele.val()) { ele.addClass(‘unsaved’); }…

Read More

SMTP, IMAP and POP server settings

GMAIL POP SMTP IMAP Host pop.gmail.com smtp.gmail.com imap.gmail.com Port 995 25 993 SSL Required Yes Yes Yes YAHOO POP SMTP IMAP Host pop.mail.yahoo.com smtp.mail.yahoo.com NA Port 110 25 NA SSL Required Yes Yes NA YAHOO PLUS POP SMTP IMAP Host plus.pop.mail.yahoo.com plus.smtp.mail.yahoo.com NA Port 995 465 NA SSL Required Yes Yes NA Windows Live POP…

Read More

Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

This error may occur to run older Rails application for conflicting with rubygems version. After a long googling I’ve come out in to following three solutions: Using Bundler.:Click here if you are interested to see the solution. Changing rubygems version: Downgrade the rubygems to an earlier version using gem update –system {version} Add “require ‘thread’”…

Read More