Question
Can't access rails app running on port 3000
I want to start up my rails application I cloned from github.
I tried running ‘rails s’ and everything seems to be working ok as you can see below…
:/home/rails# rails s
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-06-15 04:18:49] INFO WEBrick 1.3.1
[2015-06-15 04:18:49] INFO ruby 2.2.1 (2015-02-26) [x86_64-linux]
[2015-06-15 04:18:49] INFO WEBrick::HTTPServer#start: pid=26394 port=3000
However, when I go to the http://"MY_IP_ADDRESS":3000/
in my browser, It can’t be accessed.
I can only go to the root address which is http://"MY_IP_ADDRESS"/
but it would show me the default rails html page not my application.
I even tried replacing my cloned github app to /home/rails
still no hope. still the default page.
Can anyone help?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Hi,
you do specify the bind param like this: rails s -b 0.0.0.0
or if you prefer change the server to thin add gem ‘thin’* into your gem file, then do bundle install and start the server with *thin start **
This worked for me on the following environment:
– RVM Version: ruby-2.0.0-p648
– Redmine Application: 3.1.1.stable