scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 60 forks source link

Ruby 2.0 support #40

Closed grayghostvisuals closed 10 years ago

grayghostvisuals commented 11 years ago

Getting this error when I run dandelion deploy. I have the dandelion.yml file within my project root. Currently on ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0] I also have grit 2.5.0 I found a similar error to mine on this issue referencing grit compatibility with ruby 2.0.0 https://github.com/gitlabhq/gitlabhq/issues/3244

Connecting to sftp://myusername.com@myusername.com/.mysubdomainname.grayghostvisuals.com
/Users/grayghostvisuals/.rvm/gems/ruby-2.0.0-p0/gems/grit-2.5.0/lib/grit/git-ruby/internal/loose.rb:108:in `unpack_object_header_gently': undefined method `>>' for "x":String (NoMethodError)```
grayghostvisuals commented 11 years ago

Ok problem solved! I had to change the version of ruby to 1.9.3. Also FYI had to install net-sftp before running dandelion deploy just in case you wanna reflect that in the README.md

SebSept commented 10 years ago

Have the same error, using ruby 2. will it work with ruby 2 ?

scttnlsn commented 10 years ago

Unfortunately Grit (https://github.com/mojombo/grit) has not addressed Ruby 2 compatibility. I'll try adding a monkey patch to the Dandelion codebase similar to this: https://github.com/davispuh/grit/blob/1ca1edda3cfb81cf719fb92d50aff9596ca983c6/lib/grit/ruby1.9.rb

scttnlsn commented 10 years ago

Added a monkey patch that seems to do the trick: https://github.com/scttnlsn/dandelion/commit/083671e649d567054e6745f25aafd56fb7ba9123

The latest version (0.3.14) should work on Ruby 2.

SebSept commented 10 years ago

:+1: Great ! Works fine. Thanks!