I may be getting batty in my old age here, but for whatever reason Thin decided to just stop running on my system. When trying to invoke thin to further development on the code behind my awesome website, I was treated to the following:
ethan:ethang juanpaco$ thin start
/Library/Ruby/Gems/1.8/gems/thin-1.0.0/lib/thin/server.rb:51: uninitialized constant Thin::Server::Forwardable (NameError)
from /Library/Ruby/Gems/1.8/gems/thin-1.0.0/lib/thin/runner.rb:38:in `initialize'
from /Library/Ruby/Gems/1.8/gems/thin-1.0.0/bin/thin:6:in `new'
from /usr/bin/thin:19:in `load'
I didn’t like that.
I went to the line number where the error occurred (/Library/Ruby/Gems/1.8/gems/thin-1.0.0/lib/thin/server.rb:51), and found:
Not knowing what Forwardable was, and for giggles, I went to irb and typed “Forwardable” thinking I’d get the class object. Not defined. So I try “require ‘forwardable’.” There was no period in what I typed, but I haven’t figured out how to get Ruby and English to play well together. Anyway, that worked, and a subsequent typing of “Forwardable” returned the object. So then I tried putting require ‘forwardable’ at the top of server.rb in thin’s gem.
And then it worked.
I’m not sure why it used to work and then suddenly didn’t. This was after several install/uninstall, swear off programming moments. Weird. So, if you’re struggling with this same problem, perhaps the above can be of service.