Create a gist now

Instantly share code, notes, and snippets.

reading a file from inside a rake task
$ be rake read_file
"---\nstuff: this is some stuff\n and:\n - this\n - is\n - some\n - nonesense\nooerr: Hi, Mate!\n"
stuff: this is some stuff
- this
- is
- some
- nonesense
ooerr: Hi, Mate!
desc "read a file inside rake"
task :read_file do |t|
path = File.join(Rails.root,"db","data.yml")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment