尝试将更改同步到存储库时,我收到以下错误:
[designer@ip-address ~]$ ruby /home/designer/server/extension-projects/tooltwist/config/bin/syncWithGit.rb /home/designer/server/webdesign-projects/webdesign list
M navpoints/project.xml
M properties.xml
?? widgets/project_pages/training/7a12a84b6942f195f71bec5d5d8c68caec753293/
/home/designer/server/extension-projects/tooltwist/config/bin/syncWithGit.rb:28:in `block in main_list': undefined method `each' for #<String:0x00000002345128> (NoMethodError)
from /home/designer/server/extension-projects/tooltwist/config/bin/syncWithGit.rb:21:in `chdir'
from /home/designer/server/extension-projects/tooltwist/config/bin/syncWithGit.rb:21:in `main_list'
from /home/designer/server/extension-projects/tooltwist/config/bin/syncWithGit.rb:455:in `block in <main>'
from /home/designer/server/extension-projects/tooltwist/config/bin/lib_trollop.rb:740:in `with_standard_exception_handling'
from /home/designer/server/extension-projects/tooltwist/config/bin/syncWithGit.rb:448:in `<main>'
我在AWS中新部署的tooltwist设计器上收到此错误。
答案 0 :(得分:0)
此问题是由您使用的Ruby版本引起的。在Ruby 1.9中,函数String:each
被替换为String:each_line
(参见str.each in Ruby isn't working)。
您可以选择:
降级为Ruby 1.8
编辑/home/designer/server/extension-projects/tooltwist/config/bin/syncWithGit.rb并用 每个 > each_line 强>
升级到ToolTwist v8.3并使用ToolTwist命令行界面运行Designer。请参阅https://github.com/tooltwist/documentation/wiki/Deploying-with-the-v8.3-Controller中的第4步。