React_on_rails: Port on localhost is 5000 not 3000 for me

Created on 29 Jul 2016  路  6Comments  路  Source: shakacode/react_on_rails

Hey I just finished installing the gem and I noticed in the installation guide it mentions to visit localhost:3000/hello_world
screen shot 2016-07-29 at 9 56 19 am
It was actually localhost:5000/hello_world for me.

Everything is still working properly but I'm not too sure if port 3000 isn't used anymore or if it could be either 3000 or 5000 and just depends on the setup. Regardless I was wondering if this was worthy enough to add to the README?

question

Most helpful comment

Okay so I did some digging around and even though the config/puma.rb file has this line:

port ENV.fetch("PORT") { 3000 }

Here it states:

Your web process loads on port 5000 because this is what Foreman provides as a default in the $PORT env var

Considering we both have Rails 5 which uses Puma instead of WEBrick as the web dev server, that might be why it ports to :5000 instead of :3000. Maybe others who are using different version could chime in. Anyways I think it might be nice to add this in the README.md.

All 6 comments

Same here there is nothing starting at port :3000 like the CLI and documentation suggest I can see rails starting at :5000

@HintikkaKimmo Wait so you're saying that localhost:3000 does work for you? If so do you mind telling me what version of Rails are you running?

Just corrected my comment so rails starts at port 5000 not 3000 as mentioned on the tutorial and CLI input

Here are my rails, node and ruby versions.

Rails version: 5.0.0
Ruby version: 2.3.0 (x86_64-darwin15)
node versions 6.1.0

Okay so I did some digging around and even though the config/puma.rb file has this line:

port ENV.fetch("PORT") { 3000 }

Here it states:

Your web process loads on port 5000 because this is what Foreman provides as a default in the $PORT env var

Considering we both have Rails 5 which uses Puma instead of WEBrick as the web dev server, that might be why it ports to :5000 instead of :3000. Maybe others who are using different version could chime in. Anyways I think it might be nice to add this in the README.md.

Update: Make sure you're on the latest version of the gem, they have it configured in the procfile to run from port 3000.

@cubadomingo Thanks mate.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

serodriguez68 picture serodriguez68  路  7Comments

joeczucha picture joeczucha  路  6Comments

robwise picture robwise  路  3Comments

benigeri picture benigeri  路  7Comments

justin808 picture justin808  路  7Comments