Incomplete Foreman Installation


I was trying to install the foreman 1.5 in ubuntu trusty environment.
Everything went fine till the installation process stucks at 99%, and it is
not moving forward. When I checked the error logs at
/var/log/foreman-installer.log it shows

Fetching source index from

Could not fetch specs from

I consulted with IRC and they recommended to purge "ruby-foreman-bootdisk"
and "ruby-foreman-setup" . I purged the mentions packages and again ran
foreman-installer but exactly it was throwing the same problem. When I
tried to ping it was saying connection refused. Any
suggestions? Thanks in advance.