So I’ve been working on deploying my site to Media Temple and ran into some problems with the UUIDTools plugin. I think the root of the problem came from the fact that on the Grid Server at MT you cannot use the ifconfig command which the plugin was using to determine the mac address in order to generate a UUID (or GUID). The other issue was the @@mac_address was not defined when I installed the plugin on MT (though it was fine locally). Here’s what I did to fix these issues in case it helps anyone else.
1. Add the following line just below class UUID if it doesn’t exist:
@@mac_address = nil
2. Comment out the following section and add in any valid mac address:
# if macaddress != nil && macaddress != "" # nodes = macaddress.split(":").collect do |octet| # octet.toi(16) # end # else # nodes = self.randombits(48).split("").map do |chr| # if chr.respondto?(:ord) # # Ruby 1.9 # chr.ord # else # # Ruby 1.8 # chr.sum(8) # end # end # nodes |= 0b00000001 # end mac_address = "00:1d:2a:fb:d2:1f"
There’s probably a better way than hardcoding one in there but it’s working for now. If anyone has any other suggestions I’d love to hear them. Thanks.