Hi,
I recently started reading up on Ruby on Rails and decided to install it so I could give it a go. I found some inconsistencies and problems that I hope I can get some help with.
First, when creating a project I used the ruby script/generate command and it worked fine but when I wanted to start the server I had to use ruby ./script/server (note the ./).
The difference confuses me.
The server then started up on port 3000 but browsing to localhost/3000 did not give me the default Rails page as it supposedly meant to...
Am I missing something simple here?
Thank you,
Steve

Hi,
I recently started reading up on Ruby on Rails and decided to install it so I could give it a go. I found some inconsistencies and problems that I hope I can get some help with.
First, when creating a project I used the ruby script/generate command and it worked fine but when I wanted to start the server I had to use ruby ./script/server (note the ./).
The difference confuses me.
The server then started up on port 3000 but browsing to localhost/3000 did not give me the default Rails page as it supposedly meant to...
Am I missing something simple here?
Thank you,
Steve

Try starting it and navigating to

http://localhost:3000

I tried that before I posted here but all I get is an Apache error message saying the page cannot be found. I get that message even when Apache is turned off...

Try doing a:

telnet localhost 3000

To see if the service is really starting on that port or there's some other issue. If it times out the service definitely isn't started. Check your firewall settings too. Try unplugging your network cable, turning firewall completely off and hitting it.

Since it's localhost you don't need to leave yourself vulnerable while you test the service with the firewall turned off.

-Viz

You need to specify in 'config/routes.rb' file which page you want to display/load default.

Rails creates a default page so if his server is started and listening on port 3000 then it should respond to localhost:3000

This article has been dead for over six months. Start a new discussion instead.