During development, I'd like to see my Rails app from a computer other
than localhost on a Linux system and also want to change the default
port#. I thought this would do it:
Linux server:
$ script/server -b 10.4.1.84 -p 5432
=> Booting WEBrick...
=> Rails application started on http://10.4.1.84:5432
=> Ctrl-C to shutdown; call with --help for options
...
Don't know for sure but I'll check. I'm primarily a Windows developer,
just starting to move initial development over to Linux. The sys admin
gave me the port #.
(I'm in-between systems at the moment which is why I wanted to view the
app from my Windows system.)
Don't know for sure but I'll check. I'm primarily a Windows developer,
just starting to move initial development over to Linux. The sys admin
gave me the port #.
(I'm in-between systems at the moment which is why I wanted to view the
app from my Windows system.)
btw, SHOULD the script work?
To test open up lynx or some other console based web browser from the Linux command line and point it to http://localhost:5432/ if that works then it's most likely iptables.
This one had me stumped for a while too but I have found if you modify
Webrick config.rb and change the entry :DoNotReverseLookup => 'nil,' to
'true,' your non-local host will be able to connect with the Webrick
server.
You can find the config.rb file for Rails 1.9.1 and 1.9.2 in this
directory .../usr/lib/ruby/1.9.1/webrick/config.rb
Don't know for sure but I'll check. I'm primarily a Windows developer,
just starting to move initial development over to Linux. The sys admin
gave me the port #.
Then the sysadmin needs a cluebat to the head. 5432 is the standard
port for PostgreSQL and probably shouldn't be used for other purposes...
(I'm in-between systems at the moment which is why I wanted to view the
app from my Windows system.)