Monday, December 31, 2012

How to Create DNS Records using Linode API

dns = 'linode',
                                    linode_api_key: 'your-linode-api-key-goes-here')
zone = dns.zones.create(domain: '',
                 email: '')

Create a www version of your site and point to the right IP.
record = zone.records.create(value:  '', name: '', type: 'A')

To make go to the same place, use a cname record:
record = zone.records.create(value: '', name: 'www', type: 'CNAME')

Thursday, December 13, 2012

to_yaml method y broken in Ruby 1.9

vi ~/.irbrc
YAML::ENGINE.yamler = 'syck'
Save. Now you will be able to use the method y to dump objects in yaml format.

error: The following untracked working tree files would be overwritten by merge: Library/Formula/pbrt.rb

cd /usr/local
git reset --hard origin/master
brew update

Rails 3.2 Tagged Logging

MyLogger ='log/my_tagged.log'))
MyTaggedLogger.tagged("PAY") { "Hello I am working!" }

Wednesday, December 05, 2012

Tuesday, December 04, 2012

Monday, December 03, 2012

How to install local gem

1. Download the .gem file.
2. gem unpack file.gem .
. is the current directory
3. Specify in Gemfile:
   gem 'name-of-gem', '0.1.0', :path => "/path/to/the/unpacked/gem/directory"
4. bundle install