Thursday, May 15, 2014

Heroku app CNAME on Go Daddy

I'm Assuming:

  1.  you registered your domain at GoDaddy
  2. you have actual Heroku app that works on
  3.  done everything correctly from 
  4.  you have added your domain and www subdomain to heroku app like this:

$ ~/cd my_app
$ gem install heroku
$ heroku domains:add
$ heroku domains:add

now you want to point your GoDaddy  domain to your Heroku app with CNAME

1. login to goddady, and lunch your domain and click on "DNS Zone File" tab

2. Click "Add Record", Add CNAME, and point WWW to ""

3. refering to  you should point your A host  record  to

GoDaddy is changing design of their website too often, so if you cannot find these tabs, ...well, shit happens. Try to play around, they should be somewhere.

if you are looking for how to redirect / forward naked domain to www version directly from Go Daddy check this article:

how to redirect naked domains for Heroku in Go Daddy

Assuming you already set your CNAME to point www on GoDaddy to your "" (if not check this article:

1. login to Go Daddy 

2. Lunch your domain

3. In Forwarding section click "Manage"

4. Redirect your naked domain to your "" version  that is CNAME redirected to "" (http redirect should be fine unless you want access to https version from naked domain;  use 301 so that Google will like you )

Friday, May 9, 2014

Make private method public in ruby

class Foo


  def my_method
    'it work !'
# => NoMethodError: private method `my_method' called for #<Foo:0x00000003ddb8e8>

Foo.send :public, :my_method
# => "it work !" 

class Bar < Foo
  public :my_method
# => NoMethodError: private method `my_method' called for #<Foo:0x00000003ddb8e8>
# => "it work !"