December 2011
2 posts
2 tags
Undefined method `bytesize' for nil:NilClass
This error (and a related one: undefined method `unpack’ for nil) threw me for a loop today. Here’s what I was trying to do:
> s = ActionController::Base.helpers.strip_tags("foo:bar")
=> "foo:bar"
> CGI.escape(s)
NoMethodError: undefined method `bytesize' for nil:NilClass
Strange. Even less helpful was the error message that I’d get from calling the...
4 tags
How to deploy a tag to Heroku
If you are following the excellent work-flow laid out by Vincent in this post and implemented in his git extension then you will need to know how to deploy a specific tag to Heroku. The syntax for this was not obvious to me and there was little information about it on the interwebs. So, here it is (run from the master branch):
git push heroku +1.1.1^{commit}:master
What this command does is...