This article is showing how to install Ruby on Rails on a Debian-based host and configure** WeBrick** server (bundled with Ruby) to allow access from other hosts.
The first thing you have to do is installing Ruby on Rails. It is pretty easy with “apt-get” command in Debian.
If there are some errors showed in this stage, you may have to install the “build-essential” package with this command
NB: you have to add sudo before the commands if you are not running as “root” user.
If everything goes fine, you could create the very first application followed this tutorial from Ruby on Rails wiki.
Unfortunately, I found a problem as I work with Ruby on Rails installed on a non-GUI server and the WeBrick server always starts with access only for localhost. I means I can only access the server with the URL: http://localhost:3000. In this case, I need to access to server from another host in LAN usign LAN IP address like this: http://192.168.1.234:3000
To change this, you could simply call this command:
Instead of this by default:
This way, WeBrick server will start with the defined IP address and port