我正在尝试通过 Mac 机器在 iPad 真实设备上运行我的 Protractor 脚本。当我运行 config.ts 文件时出现错误
No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "sand***@***.com" with a private key was found.
日志文件。
ICPL11611:~ sandeepraulo$ cd /Users/sandeepraulo/git/alldata_protractorpoc
ICPL11611:alldata_protractorpoc sandeepraulo$ appium --chromedriver-executable /Users/sandeepraulo/Downloads/chromedriver
[Appium] Welcome to Appium v1.7.2
[Appium] Non-default server args:
[Appium] chromedriverExecutable: /Users/sandeepraulo/Downloads/chromedriver
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"","app":"/Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa","deviceName":"iPad","udid":"046e4469d6cb14ff57e378599bd4b1d09390472b","platformName":"iOS","platformVersion":"11.2.6","autoWebview":true,"autoWebviewTimeout":10000,"autoAcceptAlerts":"true","xcodeOrgId":"sandeep.raulo@infostretch.com","xcodeSigningId":"iPhone Developer","bundleId":"com.allDataProtractorPOC","count":1}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"","app":"/Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa","deviceName":"iPad","udid":"046e4469d6cb14ff57e378599bd4b1d09390472b","platformName":"iOS","platformVersion":"11.2.6","autoWebview":true,"autoWebviewTimeout":10000,"autoAcceptAlerts":"true","xcodeOrgId":"sandeep.raulo@infostretch.com","xcodeSigningId":"iPhone Developer","bundleId":"com.allDataProtractorPOC","count":1},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1524203290697 (11:18:10 GMT+0530 (IST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.64.0) session
[Appium] Capabilities:
[Appium] browserName:
[Appium] app: /Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa
[Appium] deviceName: iPad
[Appium] udid: 046e4469d6cb14ff57e378599bd4b1d09390472b
[Appium] platformName: iOS
[Appium] platformVersion: 11.2.6
[Appium] autoWebview: true
[Appium] autoWebviewTimeout: 10000
[Appium] autoAcceptAlerts: true
[Appium] xcodeOrgId: sandeep.raulo@infostretch.com
[Appium] xcodeSigningId: iPhone Developer
[Appium] bundleId: com.allDataProtractorPOC
[Appium] count: 1
[BaseDriver] Capability 'autoAcceptAlerts' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoWebviewTimeout, count.
[XCUITest] The capabilities 'autoAcceptAlerts' and 'autoDismissAlerts' do not work for XCUITest-based tests. Please adjust your alert handling accordingly.
[BaseDriver] Session created with session id: 1b29951e-c335-499e-876d-f9df97c6270b
[debug] [XCUITest] Current user: 'sandeepraulo'
[debug] [XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[debug] [XCUITest] Xcode version set to '9.3' (tools v9.3.0.0.1.1521514116)
[debug] [XCUITest] iOS SDK Version set to '11.3'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1524203321506 (11:18:41 GMT+0530 (IST))
[debug] [XCUITest] Available devices: 046e4469d6cb14ff57e378599bd4b1d09390472b
[debug] [XCUITest] Creating iDevice object with udid '046e4469d6cb14ff57e378599bd4b1d09390472b'
[XCUITest] Determining device to run tests on: udid: '046e4469d6cb14ff57e378599bd4b1d09390472b', real device: true
[BaseDriver] Using local app '/Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa'
[debug] [BaseDriver] Copying local zip to tmp dir
[BaseDriver] Unzipping local app '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/appium-app.zip'...
[debug] [BaseDriver] Unzipping /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/Payload/MyALLDATAiOS.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1524203331806 (11:18:51 GMT+0530 (IST))
[debug] [XCUITest] Checking whether app '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/Payload/MyALLDATAiOS.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [BaseDriver] Event 'resetStarted' logged at 1524203331807 (11:18:51 GMT+0530 (IST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event 'resetComplete' logged at 1524203331809 (11:18:51 GMT+0530 (IST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[debug] [XCUITest] Crash reports root '/Users/sandeepraulo/Library/Logs/CrashReporter/MobileDevice/iPad' does not exist. Got nothing to gather.
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1524203332640 (11:18:52 GMT+0530 (IST))
[XCUITest] Setting up real device
[debug] [XCUITest] Installing '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/Payload/MyALLDATAiOS.app' on device with UUID '046e4469d6cb14ff57e378599bd4b1d09390472b'...
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1524203341912 (11:19:01 GMT+0530 (IST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] WDA is not listening at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1524203342196 (11:19:02 GMT+0530 (IST))
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing running processes 'xcodebuild.*046e4469d6cb14ff57e378599bd4b1d09390472b, iproxy 8100' for the device 046e4469d6cb14ff57e378599bd4b1d09390472b...
[debug] [XCUITest] 'pgrep -nif xcodebuild.*046e4469d6cb14ff57e378599bd4b1d09390472b' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] Using Xcode 9.3, so fixing WDA codebase
[debug] [XCUITest] Generating xcode config file for orgId 'sandeep.raulo@infostretch.com' and signingId 'iPhone Developer'
[debug] [XCUITest] Writing xcode config file to /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-10h7j1e.x2tlh/appium-temp.xcconfig
[debug] [XCUITest] Using Xcode configuration file: '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-10h7j1e.x2tlh/appium-temp.xcconfig'
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=046e4469d6cb14ff57e378599bd4b1d09390472b IPHONEOS_DEPLOYMENT_TARGET=11.2 -xcconfig /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-10h7j1e.x2tlh/appium-temp.xcconfig' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will not be logged. To see xcode logging, use 'showXcodeLog' desired capability
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Log file for xcodebuild test: /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/com.apple.dt.XCTest/IDETestRunSession-FEF68B9B-C2F4-44BB-B11D-74E1E35B31AA/WebDriverAgentRunner-DF45FB1B-AC7D-4154-B485-2BFAFB2E4479/Session-WebDriverAgentRunner-2018-04-20_111920-cW0Kl1.log
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] 2018-04-20 11:19:30.291 xcodebuild[920:14416] Error Domain=com.apple.platform.iphoneos Code=-12 "Unable to launch com.apple.test.WebDriverAgentRunner-Runner" UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner}
[Xcode]
[Xcode] 2018-04-20 11:19:30.291 xcodebuild[920:14416] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted, NSUnderlyingError=0x7fd69035d610 {Error Domain=com.apple.platform.iphoneos Code=-12 "Unable to launch com.apple.test.WebDriverAgentRunner-Runner" UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner}}}
[Xcode]
[Xcode]
[Xcode] Testing failed:
[Xcode]
[Xcode] No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "sand***@***.com" with a private key was found.
[Xcode] Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1524203370374 (11:19:30 GMT+0530 (IST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 919)
[debug] [XCUITest] iproxy exited with code 'null'
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
[debug] [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
[HTTP] <-- POST /wd/hub/session 500 80617 ms - 470
最佳答案
您的“团队 ID”通常不是您的电子邮件地址。当您在 https://developer.apple.com/ 登录您的开发帐户时然后单击左侧的“成员(member)资格”,您应该会看到您的团队 ID。确保匹配您的 xCodeOrgId 所需的功能。
关于ios - 找不到签名证书 "iOS Development"| Protractor | iPad真机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49935433/
我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我正在尝试从Postgresql表(table1)中获取数据,该表由另一个相关表(property)的字段(table2)过滤。在纯SQL中,我会这样编写查询:SELECT*FROMtable1JOINtable2USING(table2_id)WHEREtable2.propertyLIKE'query%'这工作正常:scope:my_scope,->(query){includes(:table2).where("table2.property":query)}但我真正需要的是使用LIKE运算符进行过滤,而不是严格相等。然而,这是行不通的:scope:my_scope,->(que
我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file
这里有一个很好的答案解释了如何在Ruby中下载文件而不将其加载到内存中:https://stackoverflow.com/a/29743394/4852737require'open-uri'download=open('http://example.com/image.png')IO.copy_stream(download,'~/image.png')我如何验证下载文件的IO.copy_stream调用是否真的成功——这意味着下载的文件与我打算下载的文件完全相同,而不是下载一半的损坏文件?documentation说IO.copy_stream返回它复制的字节数,但是当我还没有下
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub
我正在尝试解析一个文本文件,该文件每行包含可变数量的单词和数字,如下所示:foo4.500bar3.001.33foobar如何读取由空格而不是换行符分隔的文件?有什么方法可以设置File("file.txt").foreach方法以使用空格而不是换行符作为分隔符? 最佳答案 接受的答案将slurp文件,这可能是大文本文件的问题。更好的解决方案是IO.foreach.它是惯用的,将按字符流式传输文件:File.foreach(filename,""){|string|putsstring}包含“thisisanexample”结果的
我在新的Debian6VirtualBoxVM上安装RVM时遇到问题。我已经安装了所有需要的包并使用下载了安装脚本(curl-shttps://rvm.beginrescueend.com/install/rvm)>rvm,但以单个用户身份运行时bashrvm我收到以下错误消息:ERROR:Unabletocheckoutbranch.安装在这里停止,并且(据我所知)没有安装RVM的任何文件。如果我以root身份运行脚本(对于多用户安装),我会收到另一条消息:Successfullycheckedoutbranch''安装程序继续并指示成功,但未添加.rvm目录,甚至在修改我的.bas