Octopress Rakefile にいくつかの rake タスクを追加しようとしています。タスクを別の子 rakefile に入れたいのですが、子 rakefile をインポートすると、rakefile の先頭にある定数にアクセスできません。
子rakefileを次のようにインポートしています:
Dir.glob('rakefiles/*.rake').each { |r| import r }
これは、子ファイルで読み取ることができない種類の構成です。
public_dir = "public" # compiled site directory
source_dir = "source" # source file directory
blog_index_dir = 'source' # directory for your blog's index page (if you put your index in source/blog/index.html, set this to 'source/blog')
エラーは次のとおりです。
レーキが中止されました! main:Object の未定義のローカル変数またはメソッド「source_dir」