0

I've been working on a rails app previously, the server worked fine. I closed it and made a new one https://bitbucket.org/ScarletMcLearn/sample_app

and now when I started the server, the http://localhost:3000, http://localhost:3000/static_pages/home, and anything else remains blank.

I've tried Googling and reading some other Stackoverflow posts, but they aren't working for me. I'm using a Mac - if it helps.

Really hope you can help me out here, I'm new in Rails, hence simple instructions appreciated. All files are in the Bitbucket link.

Thanks for the read. :D

After deploying rails server:

Macs-MacBook-Pro:sample_app mac$ rails server => Booting Puma => Rails 5.0.0.1 application starting in development on http://localhost:3000 => Run rails server -h for more startup options Puma starting in single mode... * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://localhost:3000 Use Ctrl-C to stop

Scarlet McLearn
  • 71
  • 3
  • 12

1 Answers1

1

There is already a previous server running on localhost:3000

In your app go to:

tmp/pids/server.pid

Delete the number inside that file and save it.

Now quit your rails server And run rails server -p 4000(anything else than 3000).

And go to that new address https://localhost:4000.

OR

Restart you pc ( you don't want to go that evil way ).

luissimo
  • 916
  • 2
  • 10
  • 31
  • Omg! Ur a saviour mate! :D It worked! Thank you! Btw, mate cant I ever use 3000 again? I have to keep doing this all the time now? How can I again use the 3000 port? :/ :D @luissimo – Scarlet McLearn Sep 13 '16 at 17:58
  • You can use it again when you restart your pc, but be careful of updates :) – luissimo Sep 13 '16 at 17:58
  • without restart its not possible? any way? and what ports are available? any number works? and what updates :/ ?? @luissimo – Scarlet McLearn Sep 13 '16 at 17:59
  • I always change the ports to be honest, and basically all ports are available. I usually go to 4000 - 5000 - 3001 or something and by that time sometimes i can use 3000 again, or i just restart my pc. But it's a good habit anyway to know how to switch servers and use multiple servers :) – luissimo Sep 13 '16 at 18:02
  • With updates i mean your computer updates which you pressed 'remind me later' on for the last couple of weeks :) – luissimo Sep 13 '16 at 18:03
  • No problem, please accept the answer if it helped you. That way people will know the question is solved, and it will help me aswell :) – luissimo Sep 13 '16 at 18:03
  • im new in stackoverflow aswell, got into it for rails :v its been a pain in the rear :v the support from you guys is epic. take care mate – Scarlet McLearn Sep 13 '16 at 18:04
  • Did that. The other posts on this site, most of em were hard to get or didn't work. Hey, you cool with me tagging you to my questions? If free, answer em please. Will accept ur ans :p @luissimo – Scarlet McLearn Sep 13 '16 at 18:06
  • Yeah but i gotta go right now for a few hours, ill check it out tonight for sure :) – luissimo Sep 13 '16 at 18:06
  • Totally :D I'll tag next time :p Tc mate – Scarlet McLearn Sep 13 '16 at 18:08
  • Sure :) , You can accept this answer by pressing on the V check mark on the left side of my post. This will let people know that the question is solved. – luissimo Sep 13 '16 at 22:39
  • So I am running into the same problem w blank screens and rails on localhost:3000. The `tmp/pids` folder in my app is empty--no `server.pid`. What does that mean? – YCode Aug 22 '18 at 03:32