-2

Hi I am complete new to web technologies. I am learning Ruby on rails right now. I am using service from www.nitrous.io. The problem is when I tried to view my work I always get following error:

We couldn't find a server running on this port – are you sure there is a server running? Make sure to bind your server to host 0.0.0.0 (instead of localhost/127.0.0.1).

Please refer to this support article for more details.

I tried all the ports 3000, 4000, 8080 and it still didn't worked. If some expert can pin point the problem it would be great.

  • Please pick a version of Rails for your tags. You're clearly not using both 3, 3.2 and 4. Also, did you follow the instructions in the question? It's not about the port number, it's recommending you make sure the server is listening on the correct IP. You want the `-b` option to tell Rails which address to bind to. – user229044 Jul 13 '14 at 05:37
  • Ok i did as you told, I only picked ruby on rails 4 for the above questions. Are you trying to say I need to run a server like XAMPP on my pc in order to view my work. Could you please clarify where I need to bind -b. Thank you meagar – Amalia Belski Jul 13 '14 at 06:04

3 Answers3

2

try this command:

rails s -b 0.0.0.0
Abel
  • 3,989
  • 32
  • 31
1

This might seem obvious, but just in case: you need to actually start your Rails server in the Nitrous console before you hit the preview tab. Type:

rails s

You can have multiple consoles open (just click the + tab), so you'll often have the server running in one console and the other open for typing commands.

I highly recommend you carefully follow this guide through to get up and running. Read it all and read it again if you're not sure what you did. Good luck!

http://guides.rubyonrails.org/getting_started.html

Codosapien
  • 175
  • 1
  • 8
0

Just use rails s -b 0.0.0.0 and ensure you are in the application directory when tuning Rails.

Undo
  • 25,519
  • 37
  • 106
  • 129