O problema é que o padrão Sinatra se liga ao "localhost" que só é acessível pelo mesmo "ip" .Se você tenta acessar de fora do droplet, você precisa vinculá-lo a < strong> 0.0.0.0 . Naturalmente, minha resposta é válida apenas para ambientes de desenvolvimento. Se você configurar como um ambiente produtivo, as instruções que você mencionou devem ser seguidas.
Sobre como configurar o bing para 0.0.0.0, você pode encontrar mais informações aqui link .
:bind - server hostname or IP address String specifying the hostname or IP address of the interface to listen on when the :run setting is enabled. The default value in the development environment is 'localhost' which means the server is only available from the local machine. In other environments the default is '0.0.0.0', which causes the server to listen on all available interfaces.
To listen on all interfaces in the development environment (for example if you want to test from other computers in your local network) use:
set :bind, '0.0.0.0'
Eu aprendi isso da maneira mais difícil, mas com o Rails, eu escrevi sobre isso aqui ( link ).
Como ambos contam com o Rack, esse link é confirmado causou a mudança no Sinatra & Rails (e qualquer outro framework Web que depende do Rack) tem esse comportamento.