Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

« Newer Snippets
Older Snippets »
3 total  XML / RSS feed 

printing debug information in development mode in Rails

// description of your code here

logger = Logger.new(STDOUT)
logger.debug ("title: #{@attr.get('title')}")
logger.debug("small_image: #{@images.search_and_convert('smallimage')}")

debug print Hpricot xml object

// description of your code here

debug(@instance_var.pretty_inspect)

/tmp/mysql.sock file not found

first finds where your .sock file is

second sets a symbolic link to the sock so Rails' default location for the sock is cool

mysql_config --socket

sudo ln -s  /var/run/mysqld/mysqld.sock /tmp/mysql.sock
« Newer Snippets
Older Snippets »
3 total  XML / RSS feed