小编use*_*378的帖子

在特立独行时安装黄瓜时出错

我收到以下错误..

RROR:  Error installing calabash-cucumber:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-gherkin_lexer_ar-dir
--without-gherkin_lexer_ar-dir
--with-gherkin_lexer_ar-include
--without-gherkin_lexer_ar-include=${gherkin_lexer_ar-dir}/include
--with-gherkin_lexer_ar-lib
--without-gherkin_lexer_ar-lib=${gherkin_lexer_ar-dir}/
--with-clib
--without-clib
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an …
Run Code Online (Sandbox Code Playgroud)

cucumber osx-mavericks

3
推荐指数
1
解决办法
1197
查看次数

在Swift 4中使用codable解析嵌套数组

我收到许多随机问题。大多像某些结构无法解码,无法理解如何定义结构。

请发现代码被截断

var JSON = """
{"variants":{"variant_groups":[{"group_id":"1","name":"Crust","variations":[{"name":"Thin","price":0,"default":1,"id":"1","inStock":1},{"name":"Thick","price":0,"default":0,"id":"2","inStock":1,"isVeg":1},{"name":"Cheese burst","price":100,"default":0,"id":"3","inStock":1,"isVeg":1}]},{"group_id":"2","name":"Size","variations":[{"name":"Small","price":0,"default":1,"id":"10","inStock":1,"isVeg":0},{"name":"Medium","price":100,"default":0,"id":"11","inStock":1,"isVeg":1},{"name":":Large","price":200,"default":0,"id":"12","inStock":1,"isVeg":0}]},{"group_id":"3","name":"Sauce","variations":[{"name":"Manchurian","price":20,"default":0,"id":"20","inStock":1,"isVeg":0},{"name":"Tomato","price":20,"default":0,"id":"21","inStock":1,"isVeg":1},{"name":"Mustard","price":20,"default":0,"id":"22","inStock":1,"isVeg":0}]}],"exclude_list":[[{"group_id":"1","variation_id":"3"},{"group_id":"2","variation_id":"10"}],[{"group_id":"2","variation_id":"10"},{"group_id":"3","variation_id":"22"}]]}}
""".data(using: .utf8)

/* 
 not sure is this the right way to define Root
*/
    struct Root : Codable {

        let variants : varientStruct
        let exclude_list : exclude_list

    }

    struct exclude_list : Codable{
        let variation_id : String
        let group_id : String
    }

    struct varientStruct: Codable {
        let variant_groups = [variant_groups_struct]
    }
    struct variant_groups_struct : Codable {
        let group_id : String
        let name :String
        let variations: [variationsStruct]
    }

    struct variationsStruct :Codable {
        let name …
Run Code Online (Sandbox Code Playgroud)

ios swift4 xcode9 codable jsonparser

0
推荐指数
1
解决办法
1724
查看次数

标签 统计

codable ×1

cucumber ×1

ios ×1

jsonparser ×1

osx-mavericks ×1

swift4 ×1

xcode9 ×1