首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我想在Fastfile中使用REXML,但当我在Fastfile中包含时不起作用

我想在Fastfile中使用REXML,但当我在Fastfile中包含时不起作用
EN

Stack Overflow用户
提问于 2019-04-01 18:14:58
回答 1查看 217关注 0票数 0

在Fastfile中使用Rexml,但是fastlane不能识别include,所以我不能包含Rexml模块。

下面是错误:

代码语言:javascript
复制
[!] Could not find action, lane or variable 'include'. Check out the documentation for more details: https://docs.fastlane.tools/actions

以下是我在Fastfile中的代码

代码语言:javascript
复制
#!/usr/bin/ruby
require 'rexml/document'
include REXML
EN

回答 1

Stack Overflow用户

发布于 2019-04-02 10:04:26

使用:

代码语言:javascript
复制
require "rexml/document"
file = File.new( "movie.xml" )
xmldoc = REXML::Document.new file

而不是:

代码语言:javascript
复制
#!/usr/bin/ruby -w
require 'rexml/document' 

# include REXML
xmlfile = File.new("movie.xml")
xmldoc = rexml.Document.new(xmlfile)

解决我的问题,但我仍然不知道为什么fastlane不能识别包含。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55452736

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档