Wednesday, January 28, 2009

Ungenerate Stuffs in rails

Rails 'generators' makes it quite easy to create basic model, controller, helper & test skeleton files

But lately I found that it is equally easy to clear files created by generator by using DESTROY.

Example

ruby script/destroy controller XXXX

Will remove all files dumped by rails for command ruby script/generate controller XXXX

ruby script/destroy scaffold XXXX

Will remove all files dumped by rails for command ruby script/generate scaffold XXXX

Tuesday, December 23, 2008

NET HELPMSG

To provide help with a Windows error message (Typically the 4 digit number from the Event Viewer system log)


Type the following in a command prompt

NET HELPMSG message#
e.g.
NET HELPMSG 2184

Tuesday, December 16, 2008

Rare issue while deleting full text catalog in SQL server 2005

select * from sysfulltextcatalogs

This Lists all the full text catalogs present for the selected table. This table contains the catalog name and the path where these are physically stored.

In case of broken index or to delete a catalog after restoring database form an external source, update the path to a physical drive present in server. ( These steps to be followed only when the there is mismatch of catalog path in the new server or the SUBST command has failed )

update dbo.sysfulltextcatalogs set path='D:\Full Text Catalog' where ftcatid=X

by default update on sysfulltextcatalogs table is disabled, run the following script to enable this.

exec sp_configure 'allow updates',1
go
reconfigure with override

Wednesday, December 3, 2008

Rails logger article

info on logger :

http://dev.ctor.org/doc/devel-logger/classes/Logger.html