Bugfix for missing module method error in FileUtils#chmod #329

Closed
wants to merge 1 commit into
from

Conversation

4 participants

This should fix the following error when using FileUtils#chmod. Unfortunately I can't find any instructions on how to run the test suite, so I haven't put a test in for it yet. If you could point me in the right direction for that then I'll happily add one :)

[00:30:36] Creating deploy account...                                              

useradd --create-home --shell /bin/bash --groups adm deploy
mkdir -p /home/deploy/.ssh
setting up sudoers...
adding id_teleport.pub to authorized_keys...
/usr/local/lib/ruby/2.0.0/fileutils.rb:970:in `chmod': undefined method `mode_to_s' for File
Utils:Module (NoMethodError)
        from /tmp/_teleported/gem/teleport/util.rb:214:in `chmod'
        from /tmp/_teleported/gem/teleport/util.rb:123:in `mkdir'
        from /tmp/_teleported/gem/teleport/util.rb:130:in `mkdir_if_necessary'
        from /tmp/_teleported/gem/teleport/install.rb:189:in `_create_user'
        from /tmp/_teleported/gem/teleport/install.rb:40:in `block (2 levels) in initialize'
        from /tmp/_teleported/gem/teleport/install.rb:261:in `_with_callback'
        from /tmp/_teleported/gem/teleport/install.rb:39:in `block in initialize'
        from /tmp/_teleported/gem/teleport/install.rb:261:in `_with_callback'
        from /tmp/_teleported/gem/teleport/install.rb:36:in `initialize'
        from /tmp/_teleported/gem/teleport/main.rb:164:in `new'
        from /tmp/_teleported/gem/teleport/main.rb:164:in `install'
        from /tmp/_teleported/gem/teleport/main.rb:20:in `initialize'
        from -e:1:in `new'
        from -e:1:in `<main>'
[01:30:36] Failed!       
Bugfix for missing module method error in FileUtils#chmod
This should fix '/usr/local/lib/ruby/2.0.0/fileutils.rb:970:in chmod: undefined method mode_to_s for File
Utils:Module (NoMethodError)'
Member

zzak commented Jul 11, 2013

@robotmay There's a few docs available for running tests

However, I think I remember @nobu saying there was no test for the module functions.

Maybe you can write one?

@ghost ghost assigned nobu Jul 11, 2013

Member

zzak commented Oct 15, 2013

@robotmay Could you show the code that caused this error? Perhaps a smaller reproducible example would help us resolve this sooner.

Thank you

@zzak Gah, I completely forgot about this; thanks for reminding me. I'll take a look at it tomorrow and see if I can provide you with something!

Owner

hsbt commented Jan 22, 2014

@robotmay you should report https://github.com/gurgeous/teleport at first.

@hsbt hsbt closed this Nov 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment