How to get root url with relative links?

How do I get my root url to work with relative links? This tag does not seem to want to point to the right place.

<%= link_to 'Home', '/' %>

I can reproduce locally like this:

gem install middleman
middleman new site
cd site
echo "<%= link_to 'Home', '/' %>" > source/index.html.erb
echo "set :relative_links, true" >> config.rb
middleman build
python -m SimpleHTTPServer &
open http://localhost:8000/build

You’ll see that the “Home” link goes back to / instead of /build which is the relative home of the site.

Read this

This it covers what you need.