Trouble with downloading Ruby

So I am trying to download Ruby from this site —
Install Ruby on Rails – Railsinstaller.org -.

Managed to download Mac OSX 10.7 and 10.8 , but when I tried to open it,
this is the message I got :

“RailsInstaller-1.0.4-osx-10.7” can’t be opened because it is from an
unidentified developer.

Your security preferences allow installation of only apps from the Mac
App Store and identified developers.

Safari downloaded this file today at 10:34 pm

Any idea how to fix this ?