Please read for an updated status on RailsCasts:
Learn more or hide this
GitHub User: gnufied
pjax_rails gem has changed significantly since this railscast was released and hence if you are trying to use it as per screencast, you may face errors.
First thing is, pjax_rails plugin does not add that pjax handler by default to all the links anymore. You will have to specify the elements for which you want pjax to work via, $('a').pjax('#data-pjax-container')
Seond thing, pjax_rails will automatically disable layout rendering if it it detects request is of type pjax.