Answer by Theo for File.expand_path("../../Gemfile", __FILE__) How does this...
File.expand_path('../../Gemfile', __FILE__) is a somewhat ugly Ruby idiom for getting the absolute path to a file when you know the path relative to the current file. Another way of writing it is this:...
View ArticleAnswer by Patrick Klingemann for File.expand_path("../../Gemfile", __FILE__)...
Two references: File::expand_path method documentation How does __FILE__ work in Ruby I stumbled across this today: boot.rb commit in the Rails Github If you go up two directories from boot.rb in the...
View ArticleFile.expand_path("../../Gemfile", __FILE__) How does this work? Where is the...
ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__) I'm just trying to access a .rb file from the some directory and a tutorial is telling me to use this code but I don't see how it is...
View Article
More Pages to Explore .....