Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Fails in windows environment. #12

Closed
Andrewsh86 opened this issue Mar 26, 2015 · 0 comments
Closed

Fails in windows environment. #12

Andrewsh86 opened this issue Mar 26, 2015 · 0 comments

Comments

@Andrewsh86
Copy link

Here's a stack trace:

C:\projects\Index>rake haml:replace_erbs --trace
** Invoke haml:replace_erbs (first_time)
** Execute haml:replace_erbs
rake aborted!
Errno::ENOENT: No such file or directory - which html2haml
C:/Ruby193/lib/ruby/gems/1.9.1/gems/erb2haml-0.1.5/lib/erb2haml/railties/erb2haml.rake:46:in ``'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/erb2haml-0.1.5/lib/erb2haml/railties/erb2haml.rake:46:inblock (2 levels) in <top (required)>' C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in`block in execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in`execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in`mon_synchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:165:in`invoke'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in`block (2 levels) in top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in`block in top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:100:in`top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in`standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/bin/rake:33:in`<top (required)>'
C:/Ruby193/bin/rake:23:in `load'
C:/Ruby193/bin/rake:23:in`

'
Tasks: TOP => haml:replace_erbs

The issue is that in line 46 of the erb2haml.rake file, it does this check:
if which html2haml.empty?

'which' is a linux (and I assume Mac) command. I replaced the 'which' with the windows semi-equivalent 'where' and it worked ok.

Thought you'd like to know that this is an issue.

@dhl dhl closed this as completed in fc2699c Mar 13, 2016
dhl added a commit that referenced this issue Mar 13, 2016
Fix #12, use ruby standard library to check if executable exists
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant