Skip to content

Instantly share code, notes, and snippets.

class ParkingLot
def initialize(spaces)
# How do I access these on the instance?
@spaces = spaces
@cars = Array.new
end
def park(car)
if @cars.length < @spaces
@cars.push(car)
[ec2-user@ip-XXXXXX chef]$ sudo gem uninstall chef
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d chef`
[ec2-user@ip-XXXXXX chef]$ sudo gem uninstall chef -v 12.0.0.alpha.2
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d chef`
[ec2-user@ip-XXXXXX chef]$ gem list -d chef
*** LOCAL GEMS ***
[ec2-user@ip-XXXXXX chef]$ bundle install
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Using rake 10.1.1
Using i18n 0.6.11
Using multi_json 1.10.1
Using activesupport 3.2.19
Using builder 3.2.2
Using ffi 1.9.6
Using libyajl2 1.1.0