I m using railsinstaller
http://localhost:3000/wage
Next page
http://localhost:3000/wage/results?hours=23
I try to access
myip:3000/wage
But it shows ERR_CONNECTION_REFUSED
I get the myip from ipconfig-->ipv4
Is the url wrong or configuration problem?
You've started well, but for local LAN only.
If your firewall and machine settings allow you to view on intranet, than go to next step:
http://api.ipify.org/
> you will see your public IP address. Use it to access your website http://<public_address>:3000/
If it works on intranet, but not on internet, you need to open the port 3000 in your router and forward it to your local machine. (If you have no access to router settings, ask your administrator to help you with this).
Give me more details for a more complete solution. What OS are you using?
EDIT:
For Windows10 you have to make sure to open the port 3000 in your firewall.
To change the default 3000 port use:
rails server -p 8080
to change port
rails server -b 0.0.0.0
to bind 0.0.0.0 address
UPDATE:
When server starts will output to the console, the address:port it listens. example:
Listening on tcp://0.0.0.0:3000
as a development server it can be set to listen on localhost requests only.
To override that settings use:
rails server -p <3030> -b 0.0.0.0
this will listen to all incoming connections on port 3030
For more details on the -p
, and -b
consult the help:
$ rails server -h
Usage: rails server [mongrel, thin etc] [options]
-p, --port=port Runs Rails on the specified port.
Default: 3000
-b, --binding=IP Binds Rails to the specified IP.
Default: localhost
-c, --config=file Uses a custom rackup configuration.
-d, --daemon Runs server as a Daemon.
-e, --environment=name Specifies the environment to run this server under (test/development/production).
Default: development
-P, --pid=pid Specifies the PID file.
Default: tmp/pids/server.pid
-C, --[no-]dev-caching Specifies whether to perform caching in development.
true or false
-h, --help Shows this help message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With