Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Brian Shetland
Brian Shetland
9,704 Points

Bin/rails server...

In my command prompt, I was able to generate my rails application from my projects directory but later, when I'm in my odot directory and I type bin/rails server it says:

'bin' is not recognized as an internal or external command, operable program or batch file.

Because this doesn't work, I can get to localhost:3000

Does anyone know what I might be doing wrong?

Thanks in advance

10 Answers

Are you using the Treehouse virtual machine or is this a local installation of Rails?

Try just typing "rails s" or "./bin/rails s" and see if that works for you.

Can somebody explain why Jason uses bin/rails server and not just rails server Does it relate to the treehouse vm? Would I still need to do that locally?

Brian Shetland
Brian Shetland
9,704 Points

I'm using a local install after trying and failing to use the virtual machine. The VM requested a treehouse login and password and after trying: "treehouse" with the password "mikethefrog" & "mike the frog". I also tried my login and password and that failed too.

Just tried "rails server" from the odot directory and it started up but then it exited after stating: "TCPServer Error: Only one usage of each socket address is normally permitted"

I feel like I'm making some progress, however slowly.

Brian Shetland
Brian Shetland
9,704 Points

Got everything to work now. Thank you very much for your help!

Your welcome :) glad to hear it's working for you!

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Brian Shetland just a heads up that the password to the virtual machine is "treehouse" but the vagrant ssh command should get you in there automatically. Sorry for the trouble!

Hello,

I am having the same issue (Windows, locally installed, bin/rails server not working.

rails s and .bin/rails server both do not work.

Any additional methods to try?

Thanks guys :)

Joaquin Godoy
Joaquin Godoy
4,632 Points

Björn's solution of trying just "rails s" solved the issue I had which is also Noah's problem. Ty bro

Ok.. so that means you having something else running on port 3000 and you can only have one thing run at the same time on a port. Are you somehow booting up two rails servers?