Latest Debian major release, Wheezy, ships by default with Ruby Sinatra 1.3.2 and you know what? Foreman will not play well with it! As an example, I couldn’t provision new hosts (a generic error code 400 was thrown, plus lot of ruby complaints on the foreman-proxy log).

Thanks to the amazing guys on #theforeman channel at irc.freenode.net I was pointed to the quick and dirty fix: downgrading Sinatra to the previous working version (1.3.1). Here we go: Uninstall default Sinatra (leave dependencies where they are)

dpkg  --force-depends -r ruby-sinatra

Move to your Foreman folder:

cd /usr/share/foreman

Install Sinatra 1.3.1 from gems

gem install sinatra -v 1.3.1

Check:

gem query
*** LOCAL GEMS ***
bundler (1.2.2)
[...]
sinatra (1.3.1)

Done!