davetron5000 / gli

Make awesome command-line applications the easy way
http://davetron5000.github.io/gli
Apache License 2.0
1.26k stars 102 forks source link

Faltal error in gemspec and a Window$ suggestion #254

Closed jpc2 closed 7 years ago

jpc2 commented 7 years ago

Trying to get gli to work on Windows - almost every thing I try to use in Ruby gives me fits... Guess I should mess with it on my mail server, it is the only live Linux box left.

Anyway, trying to make the simple todo sample in the Wiki and your book. On a fresh 'gli init todo list add complete', when I do a 'bundle exe bin/todo' I get the following fatal: Not a git repository (or any of the parent directories): .git This is from bundler and is caused by line 11 or so in the todo.gemspec. The line is not in the code for the book. Comment it out and things work. Apparently it is a common problem. See bundler issue #2039. Looking at the scaffold.rb file it is at line 66. I also question the "\n". In the todo.gemspec I end up with two lines instead of one. The "\n" is just output as ....split( ).

It would be nice if the scaffold.rb could check the RUBY_PLATFORM and on Windows generate a bin/project.bat file. It just needs two lines. @echo off ruby.exe %~dpn0 %* I'm expecting more problems when I get to Aruba... I've figured partial fixes on some of that before but....

John

davetron5000 commented 7 years ago

That error could be because you haven't created a git repo for your app? The bundler stuff is assuming you have a git repo.

I don't have access to a Windows box to test anything, but last time I did, the Aruba stuff didn't work at all. Whatever it's doing under the covers was not windows-compliant. Let me know what you find out.