Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (15 sloc) 393 Bytes
layout title date tags
post
path unshift dirname of file
2015-08-31 14:17:46 +0200
ruby

Instead of using:

$:.unshift File.dirname(__FILE__)

to add a folder to the path, a better way inside your ruby code is to use:

require_relative 'subfolder/file'

in order to require files. You can also use a relative path in require (i.e. './subfolder/file').

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.