Very new

Do I have to know what version of ruby, rails, gems, etc. the hosting
server has? so I can use the same versions in development?
If the web hosting changes the public directory to difrent name,( I
don’t know why they do that, maybe security reasons) , do I have to make
changes to the way rails behaves? like images, stylsheet, etc.