Closed biximilien closed 8 years ago
Are you seeing railroady
, sed
, and dot
all on your PATH? All three are necessary.
Hmm, they do seem to be on path.
Sorry for the late response.
The problem is in the rake file. Windows sees a pipe symbol in the string passed to the -r option. If you enclose that string in double quotation marks, it does work. Not sure if this would break things in other operating systems.
So change the self.sed in railroady.rake to:
def self.sed regex = 's/\x1B[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' case RbConfig::CONFIG['host_os'] when /linux|cygwin|mingw|mingw32/ return "sed -r \"#{regex}\"" when /mac|darwin|bsd/ return "sed -E '#{regex}'" else fail NotImplementedError end
I'm happy to merge this if someone would like to submit a non-breaking patch. I (fortunately) don't have a straightforward way to test Windows-specific changes. :)
The suggested change is working for me on windows. I would be willing to submit a patch, but I don't know how to test that it is non-breaking (as mentioned in my previous post). Could you point me in the right direction?
If you want to break the "linux" part of that when
into a separate when
(so all the Windows stuff is separate), we should be fine. I'm happy to verify on OS X and Ubuntu.
Can I close this out? If there are no outstanding patches I'd like to clear up the issue tracker a bit..
The patch was merged, so yes, this issue can be closed On Feb 9, 2016 4:58 PM, "Preston Lee" notifications@github.com wrote:
Can I close this out? If there are no outstanding patches I'd like to clear up the issue tracker a bit..
— Reply to this email directly or view it on GitHub https://github.com/preston/railroady/issues/82#issuecomment-181926125.
Hi,
Im receiving the following error message when attempting to run rake diagram:all on x64_mingw platform. GraphViz is installed and on PATH.
Here is the trace:
* Invoke diagram:all (first_time) * Invoke diagram:setup:create_new_doc_folder_if_needed (first_time) * Execute diagram:setup:create_new_doc_folder_if_needed * Invoke diagram:models:complete (first_time) \ Execute diagram:models:complete railroady -lamM | sed -r 's/\x1B[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' | dot -Tsvg > C:/Users/Maxime/Documents/wild-compass/doc/models_complete.svg 'K]' is not recognized as an internal or external command, operable program or batch file. rake aborted! Command failed with status (255): [railroady -lamM | sed -r 's/\x1B[([0-9]{1...] c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/file_utils.rb:66:in'
Tasks: TOP => diagram:all => diagram:models:complete
Generating C:/Users/Maxime/Documents/wild-compass/doc/models_complete.svg
block in create_shell_runner' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/file_utils.rb:57:in
call' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/file_utils.rb:57:insh' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/file_utils_ext.rb:37:in
sh' c:/Ruby21-x64/lib/ruby/gems/2.1.0/bundler/gems/railroady-490a01646523/tasks/railroady.rake:65:inblock (3 levels) in <top (required)>' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in
call' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:inblock in execute' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in
each' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:inexecute' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in
block in invoke_with_call_chain' c:/Ruby21-x64/lib/ruby/2.1.0/monitor.rb:211:inmon_synchronize' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in
invoke_with_call_chain' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:201:inblock in invoke_prerequisites' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:199:in
each' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:199:ininvoke_prerequisites' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:178:in
block in invoke_with_call_chain' c:/Ruby21-x64/lib/ruby/2.1.0/monitor.rb:211:inmon_synchronize' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in
invoke_with_call_chain' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:ininvoke' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in
invoke_task' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:inblock (2 levels) in top_level' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in
each' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:inblock in top_level' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in
run_with_threads' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:intop_level' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in
block in run' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:instandard_exception_handling' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in
run' c:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in<top (required)>' c:/Ruby21-x64/bin/rake:23:in
load' c:/Ruby21-x64/bin/rake:23:in `