Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access sinatra app through the local network

I have rails application. If I start it with rails s (port 3000), it works perfectly both on my machine and every device on my local network via the ip address (192.168.0.3 in my case).
I have sinatra application. If I start it with ruby app.rb (port 4567), it works perfectly on my machine, but it it is not accessible from other devices on my local network.

enter image description here

Both application use Thin as an app server.

Is it something related to how sinatra works?

like image 717
Alex Smolov Avatar asked Apr 20 '13 09:04

Alex Smolov


1 Answers

Try ruby app.rb -o 0.0.0.0 or ruby app.rb -e production. Either should work.

like image 141
Ivan Zamylin Avatar answered Oct 04 '22 19:10

Ivan Zamylin