Posts

Showing posts from April, 2010

Checking requirements in Routes

Here by i have checked routes for domain_name with alpha-numeric. map.home '/homes/:domain_name/:id',:controller=>'home', :action=>'new', :requirements => { :domain_name => /[A-Za-z0-9.]+/}

sending ajax request in rails

Hi Just for syntax, used this for sending ajax request.. new Ajax.Request('/controller/action', {asynchronous:true, evalScripts:true, method:'get', parameters:'params1=' + param + '&param2=' + param + '&param3=' + param }); return false; Thanks, Sri

sending ajax request in rails

Hi Just for syntax, used this for sending ajax request.. new Ajax.Request('/controller/action', {asynchronous:true, evalScripts:true, method:'get', parameters:'params1=' + param + '&param2=' + param + '&param3=' + param }); return false; Thanks, Sri

Find Number of mp3 files in a directory

To Find Number of mp3 files in a directory, I got this, ls | grep .*.mp3 | wc -l Thanks, Srikanth

Thinking sphinx

Hi, This is a Great plugin in Rails for the search options. This comes with many inbuilt functionalities. There are many tutorials & Videos on how to work this. But I struggled a lot in Installation. 1. I have installed the Thinking sphinx Plugin, But there was error srikanth@client30:~/project$ rake thinking_sphinx:index Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file: * bin_path * searchd_binary_name * indexer_binary_name For more information, read the documentation: http://freelancing-god.github. com/ts/en/advanced_config.html Generating Configuration to /home/srikanth/projects/ thisproject/config/ development.sphinx.conf Solution : You will have to download and install the sphinx software. Thinking sphinx is only a wrapper around sphinx. You can get sphinx at http://sphinxsearch.com/ 2) After I Install sphinx, when I start it srikanth@client30:~/projects/ my project$ rake thinking_sphinx:start (in /home/srik...