How can I display document root?

Hi- This is a newbie question:

I started an http server:

myserver = HTTPServer.new(:Port => 8080, :DocumentRoot => Dir::pwd + "/temp") myserver.start

Q: how do I display the current document root? man thanks Max

max radin wrote:

Hi- This is a newbie question:

I started an http server:

myserver = HTTPServer.new(:Port => 8080, :DocumentRoot => Dir::pwd + "/temp") myserver.start

HTTPServer is not a Rails class. I think you're on the wrong forum. Maybe try the Ruby forum.

Robert You are correct. This is plain Ruby class as I am learning the basics but even so, under Rails, how can I display document_root? If there a config variable I can display? thanks

max radin wrote:

Robert You are correct. This is plain Ruby class as I am learning the basics but even so, under Rails, how can I display document_root? If there a config variable I can display? thanks

For Rails apps you have Rails.root which give you the root of the Rails project. The actual web server document root would then be "#{Rails.root}/public"