Skip to content

Instantly share code, notes, and snippets.

@ascendbruce
Created October 20, 2013 15:13
Show Gist options
  • Select an option

  • Save ascendbruce/7070911 to your computer and use it in GitHub Desktop.

Select an option

Save ascendbruce/7070911 to your computer and use it in GitHub Desktop.
Ruby get current file full path (absolute path)
File.expand_path(File.dirname(__FILE__))
# If you want to require some files in different directory, in ruby 1.9, you may want to use:
require_relative "../xxxlib"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment