关于ruby script/runner

本文分享了一次在使用Ruby脚本过程中遇到的问题,即在方法调用时传递参数的正确方式。通过一个具体例子说明了当方法需要参数时,在命令中如何正确地使用引号。
[edit by rsh]
我想这必定是一个深刻的教训:
ruby script/runner A.test('args') --- ERROR
如果后面的方法带参数,一定要在()的两端加["]号.
正确的命令是:
ruby script/runner A.test"('args')"

一直都不知道为什么要这样,有哪位大虾道行高的,请指教。先谢过了!
swift开发.framework后引入项目构建失败:Cycle inside Runner; building could produce unreliable results. Cycle details: → Target 'Runner' has copy command from '/Users/huang/workspace/dingwork/ios/Runner/HXGPSLibrary.framework' to '/Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework' ○ That command depends on command in Target 'Runner': script phase “[CP] Copy Pods Resources” ○ That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks” ○ That command depends on command in Target 'Runner': script phase “Thin Binary” ○ Target 'Runner' has process command with output '/Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Info.plist' ○ Target 'Runner' has copy command from '/Users/huang/workspace/dingwork/ios/Runner/HXGPSLibrary.framework' to '/Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework' Raw dependency cycle trace: target: -> node: <all> -> command: <all> -> node: /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata -> command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:ExtractAppIntentsMetadata -> node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase6-copy-files> -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase6-copy-files -> node: <CodeSign /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework> -> command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:CodeSign /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework -> node: <Copy /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework> -> CYCLE POINT -> command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:Copy /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework /Users/huang/workspace/dingwork/ios/Runner/HXGPSLibrary.framework -> node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase5--cp--copy-pods-resources> -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase5--cp--copy-pods-resources -> node: /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/GoogleMVFaceDetectorResources.bundle -> command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:PhaseScriptExecution [CP] Copy Pods Resources /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Script-19F20B6C0CD25FD6E85E75C8.sh -> node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase4--cp--embed-pods-frameworks> -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase4--cp--embed-pods-frameworks -> node: /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/FBLPromises.framework -> command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:PhaseScriptExecution [CP] Embed Pods Frameworks /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Script-F8A788B4E16AF3EB4D984A43.sh -> node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase3-thin-binary> -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase3-thin-binary -> node: <execute-shell-script-18c1723432283e0cc55f10a6dcfd9e02f1eee2015e8ff5ebcd27678f788c2826-target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-> -> command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:PhaseScriptExecution Thin Binary /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh -> node: /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Info.plist/ -> directoryTreeSignature: � -> directoryContents: /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Info.plist -> node: /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Info.plist -> command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:ProcessInfoPlistFile /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Info.plist /Users/huang/workspace/dingwork/ios/Runner/Info.plist -> node: /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework -> command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release:Copy /Users/huang/Library/Developer/Xcode/DerivedData/Runner-bazajqkiexewywfyfzkooqyxlajw/Build/Products/Release-iphoneos/Runner.app/Frameworks/HXGPSLibrary.framework /Users/huang/workspace/dingwork/ios/Runner/HXGPSLibrary.framework
最新发布
10-22
flutter运行时发生错误Showing All Errors Only Build target Runner of project Runner with configuration Release note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target 'Runner' from project 'Runner') warning: Unable to read contents of XCFileList '/Target Support Files/Pods-Runner/Pods-Runner-resources-Release-output-files.xcfilelist' (in target 'Runner' from project 'Runner') warning: Unable to read contents of XCFileList '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-output-files.xcfilelist' (in target 'Runner' from project 'Runner') error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-input-files.xcfilelist' (in target 'Runner' from project 'Runner') error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-output-files.xcfilelist' (in target 'Runner' from project 'Runner') error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Release-input-files.xcfilelist' (in target 'Runner' from project 'Runner') error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Release-output-files.xcfilelist' (in target 'Runner' from project 'Runner') warning: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner') note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner') note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner') warning: Run script build phase '[CP] Copy Pods Resources' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner') Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-input-files.xcfilelist' Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-output-files.xcfilelist' Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Release-input-files.xcfilelist' Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Release-output-files.xcfilelist'
05-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值