Save fixdns.rb to your devenv, e.g to ~. Run it like this:
/var/www/openshift/broker/script/rails r ~/fixdns.rb <login>
Also, run this to fix /etc/openshift/port-proxy.cfg:
ip=$(facter ipaddress)
sed -i "s,bind 10\.[0-9.]\+:,bind $ip:," /etc/openshift/port-proxy.cfg