CLI: Clarify that CLI is relative to cwd / include rake task to automate #178

Open
frommww opened this Issue Jul 24, 2012 · 2 comments

Projects

None yet

3 participants

@frommww
Iron.io member

Should make notes in places that the CLI works relative to the current directory and that absolute paths are needed. Also document the rake task that will allow people to automate the upload.

Erich Timkar
9:55 Hmmm, it's turns out you have to give it the full path...

Ken Fromm
9:57 can you explain how you're running it so we can understand how to adjust the documentation?

Erich Timkar
9:57 I'm working ruby 1.9 in using the _ng gem. I've created a worker and a ruby file, located in in a relative subdirectory of app/workers/*

Erich Timkar
9:59 I did JUST get it upload once I put the relative path the workfile... apparently it doesn't magically go out an find it in a subdirectory.

Ken Fromm
10:00 ok. so with the cli you were running that in app directory and not in the worker directory. right?
uploading from the app directory.

Erich Timkar
10:00 Yep, the app directory

Michael Fellinger
10:02
@ErichTimkar yeah, all paths are relative to cwd
so if you want to automate that, i'd recommend a rake taks that chdirs into the app/worker dir and does what you need
*task

10:06
there is a third option, which isn't as "official"
at the top of your .worker file, you can put Dir.chdir(File.dirname(FILE))
that will change all further relative paths to be relative to the directory the worker file is in

(not sure we want to document/recommend the third/unofficial option)

@erichtimkar
@paddyforan paddyforan was assigned Aug 30, 2012
@paddyforan

Removing my assignment.

@paddyforan paddyforan removed their assignment Apr 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment