26
Jul

RAILS_ROOT

   Posted by: Vivek Khokhar   in Rails, Ruby

RAILS_ROOT gives you relative path within the applications it works fine as far as you need the path within rails application.

How about getting absolute path to rails folder?

I found one way, and thats from the ENV hash.

You can use ENV['PWD'] to find absolute path to the rails folder.
Any other ways ??

*Update 4th Oct 2007*

Dir.pwd is a better way

This entry was posted on Thursday, July 26th, 2007 at 1:38 am and is filed under Rails, Ruby. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

You must be logged in to post a comment.