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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
max radin wrote:> Hi- > This is a newbie question: > > I started an http server: > > myserver = HTTPServer.new(:Port => 8080, > :DocumentRoot => Dir::pwd + "/temp") > myserver.startHTTPServer is not a Rails class. I think you''re on the wrong forum. Maybe try the Ruby forum. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 On May 12, 9:10 am, Robert Walker <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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. > -- > Posted viahttp://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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? > thanksFor 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" -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.