Using rails server, question about security and open ports


#1

Hello everyone,

I just finished the Ruby course and I would like to start the Rails course.
However in the first lesson it asks me to run commands in the terminal (I'm guessing to install Ruby etc on my Mac) including a "$ rails server" command.

I would like to know if this will open ports or create some kind of security hole that I should be aware of and therefore correct with a firewall or something if I want to only work on localhost level for the moment ?

Thanks for your help !


#2

If you want to do it on your computer instead of Codecademy, then yes, you need to install ruby, and then install rails. rails server command starts a server available on your localhost. However, you can do every exercise on Codecademy for now :slight_smile:


#3

Thanks for your reply and help !
I also thought everything would be inside Codecademy but the server and browser windows are inanimate, nothing is happening so I was wondering if first had to install Ruby then restart the browser or something.

In any case, if I run the rails server command, the server that will be created is only local by default ? It won't broadcast any open ports on internet ?


#4

No, only you are able to access localhost.
From other posts from past hours i indicate there is known issue with certain exercises not loading. It should be fixed in a couple of hours as it usually is, and then you can practice on CC.
If you want to start using rails locally - look for some tutorials - especially if you use windows.


#5

Ok thanks a lot !

But just so I understand correctly, the rails server is therefore always localhost and has no open ports towards the internet ?


#6

Yes. Only users of your own LAN could access it. If you're the only user, then you're 100% safe.


#7

Ok thanks a lot for all your help !


#8

You could configure your RoR server to be public, it's not always only on localhost - just by default. The Codecademy course doesn't need you to install anything locally, and the localhost you visit in the course isn't your actual localhost - it's all on a Codecademy server somewhere else. What you do in the course shouldn't affect your computer's security.


#9

Thanks a lot as well, good to know then if it can be changed in the future ! I guess I'll wait a bit and see if it unblocks the lesson :smiley:


#10

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.