Fix actual_root_path implementation#119
Conversation
|
|
||
| def actual_root_path | ||
| root_path || Dir.pwd | ||
| root_path || File.dirname(File.realpath(__FILE__)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
ok, in rails > 2.0, this is __dir__
Anyone have an opinion if this change is still necessary?
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.