There is no ratio.
It depends on the search engines. Yahoo/Bing take on-site & content into consideration more-so.
Google is big on links.
There is no way to assign them a ratio because it all builds upon each other. If you have poor on-site optimization but great link building, you will still rank low and not likely for your key terms. If you have the opposite, you will most likely rank decently but never get to the top.
Both are very important but for different reasons.