-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix actual_root_path implementation #119
base: master
Are you sure you want to change the base?
Conversation
@@ -46,7 +46,7 @@ def extension | |||
protected :extension | |||
|
|||
def actual_root_path | |||
root_path || Dir.pwd | |||
root_path || File.dirname(File.realpath(__FILE__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work? File.new(File.dirname(__FILE__)).realpath
I'm assuming we want to use File.dirname(__FILE__)
over __dir__
for ruby version compatibility. too bad.
Hello @drewbug could you share what you are trying to do here? |
@kbrock: The README says: I was just attempting to bring the actual implementation into line with this. I was bitten by this when starting a daemon from a different working directory. My easy workaround is: |
Thanks, that is helpful. Using dir or filename will be the same result. The directory of this gem file, not the caller's dir. Maybe caller or caller_location may be of use? I'll try and play with this... |
You're right, @kbrock, I didn't even think about that. D'oh! |
@drewbug there may be a way to look at |
No description provided.