Bug in Ramaze::Global.root

1 view
Skip to first unread message

pachl

unread,
Sep 5, 2008, 4:12:37 AM9/5/08
to Ramaze
I'm not sure if this is a bug, but Ramaze::Global.root does not report
the correct application directory. In lib/ramaze/option.rb, root is
set using the the following code:

File.dirname(File.expand_path($0))

However, I start my Ramaze app using `thin start` and $0 points to the
thin binary. Therefore, Ramaze::Global.root reports /usr/local/bin,
but my Ramaze app is in /home/pachl/work/mokaz/www.

-pachl

sam carr

unread,
Sep 5, 2008, 5:08:13 AM9/5/08
to ram...@googlegroups.com
It's probably for the same reason that you have to explicitly set $0
to the correct value in order to get debugging of NetBeans apps to
work properly in NetBeans. It could be argued that Ramaze should try
harder to properly figure out its root, not relying on $0 in
particular, but I'll leave it to someone else to answer that.
Reply all
Reply to author
Forward
0 new messages