Middleman build breaks link and script references

I have started my first Middleman project and I loved how easy it was to get started. However I am having issues building my project for hosting. When I do a build and open the generated index.html file I expect that the site should work as it did on localhost:4567 but that is not the case.

In my layout.erb file I have these link tags which work in development

<%= stylesheet_link_tag \
	"style" \
	, "http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"
%>

These resolve to

<link href="/stylesheets/style.css" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet" type="text/css">

But the link to style.css doesn’t map correctly if one was to open the index.html file without the Middleman server because of the leading forward slash. Has anyone else come across this problem and has a solution? Please discount url rewrite rules

Fixed it by enabling

# Use relative URLs
  activate :relative_assets

in config.rb