Closed andymeneely closed 8 years ago
Thanks for the report. Unfortunately I do not have any experience with Ruby on Windows, I'll need your help with debugging.
Let's start with some questions:
bundler
in your project? Maybe we should run bundle exec rake
instead of plain rake
...mix.bat
command instead of the plain mix
on Windows. Is rake.exe
in the path or is there rake.bat
(or something else)?I just tried to check the content of the http://dl.bintray.com/oneclick/rubyinstaller/ruby-2.2.3-i386-mingw32.7z archive from http://rubyinstaller.org/downloads/. There is a rake.bat
wrapper which runs the rake
script via ruby.exe
. (And no rake.exe
is present.)
Does it help if you change rake
to rake.bat
here: https://github.com/lslezak/build-rake/blob/d709b5893b041bf99a28eaf74d729eed4576c25c/lib/build-rake.coffee#L29 ?
(On Linux the downloaded Atom packages are located at ~/.atom/packages
I guess it is similar on Windows. Do not forget to restart Atom after editing the file...)
Oh, there is one more place which runs rake
: https://github.com/lslezak/build-rake/blob/d709b5893b041bf99a28eaf74d729eed4576c25c/lib/build-rake.coffee#L22. Please, adapt also this line...
Yes! That did the trick. Interestingly, I only had to change the line on line 29, but not 22. The rake -T
always worked fine, but not the actually running of it. Changing line 22 to rake.bat -T
didn't hurt though.
I don't know enough CoffeeScript to detect the OS version. I'll look into it and make a pull request if I get it working.
I got a fix. Pull request incoming...
Ok, I've got the pull request set up, but I can't get the tests to pass locally. I'm trying to get something like spyOn(process, 'platform').andReturn("osx")
to get the test passing again before I add a Windows version of the test. That's where I'm stuck.
Thanks for the feedback and the pull request!
I'll look at the failing test...
It seems that mocking the process
does not work properly. You need to use this trick:
Object.defineProperty process, 'platform', value: 'MockOS'
See more details here: http://stackoverflow.com/questions/30405397/how-do-you-mock-process-platform-in-jasmine-tests
That did it. I refactored the tests a bit and added a new one for Windows. Should be good to go.
v.0.1.1 with the fix has been published at atom.io. Thank you a lot for the fix! :+1:
Glad to see someone's trying to get
rake
working with the build package. I have not been able to get thebuild
package to work on my system. When I use it with this package, I get this error:The
rake
command is definitely on my path - inC:\Ruby22\bin
.