Allow public connections to local Ruby on Rails Development Server

The simplest way requires NO additional installations: just add a single option to your rails server (or rails s) command when you start up the server:

rails s --binding=0.0.0.0

The 0.0.0.0 address means “listen to requests from anywhere.” On many systems, the default is 127.0.0.1, which means “listen to requests from localhost only.”

(If you don’t also specify a -p or --port option, then the port shall be 3000, as usual.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)