I made it work. After having tracked the problem down to xcodeproj (0.10.1) I tried another version of xcodeproj (0.9.0), and it worked :) So just uninstall xcodeproj (0.10.1) with:
sudo gem uninstall xcodeproj --version 0.10.1
And after that install xcodeproj (0.9.0) with:
sudo gem install --version 0.9.0 xcodeproj
That's it :)