Skip to content

2011

Fixing Chef’s “Attribute hotspot is not defined” error

I was trying to install Opscode's Chef using the "Bootstrap Chef Rubygems Installation" method. It was failing hard with something about a 'hotspot'.

[mbailey@island chef]$ sudo chef-solo -c /etc/chef/solo.rb -j ~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
[sudo] password for mbailey:
[Mon, 14 Feb 2011 15:20:34 +1100] INFO: Setting the run_list to ["recipe[chef::bootstrap_server]"] from JSON
[Mon, 14 Feb 2011 15:20:34 +1100] INFO: Starting Chef Run (Version 0.9.12.1)
[Mon, 14 Feb 2011 15:20:34 +1100] ERROR: Running exception handlers
[Mon, 14 Feb 2011 15:20:34 +1100] ERROR: Exception handlers complete
/usr/local/lib/ruby/gems/1.9.1/gems/mbailey-chef-0.9.12.1/lib/chef/node/attribute.rb:428:in `method_missing': Attribute hotspot is not defined! (ArgumentError)

There's a bug in ohai-0.5.8 (19 Oct 2010) that is fixed in HEAD. The simple steps fixed my problem and allowed me to install Chef.

$ git clone git://github.com/opscode/ohai.git
$ cd ohai
$ sudo rake install
gem install pkg/ohai-0.5.8 # but I wanted sudo gem install
Successfully installed ohai-0.5.8
1 gem installed
$ sudo gem install pkg/ohai-0.5.8.gem
Successfully installed ohai-0.5.8
1 gem installed

I hope this saves you some time and frustration.

Making vim look like textmate (again!)

A few years ago I posted about my quest to make editing ruby in my terminal as beautiful as in Textmate. I've been back on linux for a year now but it's only tonight I've gotten around to sorting out my vim display.

RedCar, an open source cross platform alternative to TextMate, reminded me how pretty code can look. Tonight I worked out how to make vim on ubuntu lucid look just as lovely.

  1. Grab the twilight256 colorscheme and drop it into ~/.vim/colors/twilight256.vim
  2. Make sure you're using 256 color terminal (I put this in ~/.bashrc) export TERM=xterm-256color
  3. Tell vim to use this colorscheme (I put it in ~/.vimrc) colorscheme twilight256
  4. In my terminal under "Edit" -> "Profile Preferences" I selected "Deja Vu Sans Mono Book" "13"

I can't believe it took me so long to do this but I'm glad I finally have.

Ruby can look pretty under Vim on Linux