Code Monkey home page Code Monkey logo

cryptocopycats / copycats Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 6.0 2.61 MB

copycats command line tool (and core library) - crypto cats / kitties collectibles unchained - buy! sell! hodl! sire! - play for free - runs off the blockchain w/ ledger lite - no ether / gas required; run your own peer-to-peer (P2P) network node over HTTP

License: Creative Commons Zero v1.0 Universal

Ruby 96.43% CSS 0.12% HTML 3.45%
blockchain copycats cryptocollectibles cryptocopycats cryptokitties hyperledger kittyverse

copycats's People

Contributors

geraldb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

copycats's Issues

Error during database setup

I'm getting the error as shown below, and the kitties.db file is created with the empty tables:

C:\dev\my\ruby\cryptokitties>ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]

C:\dev\my\ruby\cryptokitties>gem --version
3.4.10

C:\dev\my\ruby\cryptokitties>gem list copycats

*** LOCAL GEMS ***

copycats (0.8.1)

C:\dev\my\ruby\cryptokitties>gem list base32-alphabets

*** LOCAL GEMS ***

base32-alphabets (1.2.0)

C:\dev\my\ruby\cryptokitties>dir
 Volume in drive C is OSDisk
 Volume Serial Number is 24FC-EE20

 Directory of C:\dev\my\ruby\cryptokitties

03/07/2023  04:58 PM    <DIR>          .
03/07/2023  04:58 PM    <DIR>          ..
03/07/2023  04:26 PM    <DIR>          1-99_999
03/07/2023  04:26 PM    <DIR>          100_000-199_999
03/07/2023  04:26 PM    <DIR>          200_000_299_999
03/07/2023  04:26 PM    <DIR>          300_000-399_999
03/07/2023  04:26 PM    <DIR>          400_000-499_999
03/07/2023  04:26 PM    <DIR>          500_000-599_999
03/07/2023  04:26 PM    <DIR>          600_000-699_999
               0 File(s)              0 bytes
               9 Dir(s)  32,311,013,376 bytes free

C:\dev\my\ruby\cryptokitties>kitty setup
warn: duplicate trait name!! overwritting old totesbasic:
{:name=>"totesbasic", :kai=>"f", :code=>"PA14", :type=>:pattern}
warn: duplicate trait name!! overwritting old totesbasic:
{:name=>"totesbasic", :kai=>"g", :code=>"PA15", :type=>:pattern}
{}
["setup"]
Connecting to db using settings:
{:adapter=>"sqlite3", :database=>"./kitties.db"}
D, [2023-07-03T17:01:20.053278 #36540] DEBUG -- :    (0.2ms)  PRAGMA synchronous=OFF;
D, [2023-07-03T17:01:20.053927 #36540] DEBUG -- :    (0.1ms)  PRAGMA journal_mode=OFF;
D, [2023-07-03T17:01:20.054718 #36540] DEBUG -- :    (0.1ms)  PRAGMA temp_store=MEMORY;
-- create_table(:kitties)
D, [2023-07-03T17:01:20.087130 #36540] DEBUG -- :    (0.8ms)  CREATE TABLE "kitties" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "genes_kai" varchar NOT NULL, "gen" integer NOT NULL, "birthdate" datetime(6) NOT NULL, "day_count" integer NOT NULL, "matron_id" integer, "sire_id" integer, "is_fancy" boolean DEFAULT 0 NOT NULL, "is_exclusive" boolean DEFAULT 0 NOT NULL, "is_founder" boolean DEFAULT 0 NOT NULL, "body_id" integer NOT NULL, "pattern_id" integer NOT NULL, "coloreyes_id" integer NOT NULL, "eyes_id" integer NOT NULL, "color1_id" integer NOT NULL, "color2_id" integer NOT NULL, "color3_id" integer NOT NULL, "wild_id" integer NOT NULL, "mouth_id" integer NOT NULL)
D, [2023-07-03T17:01:20.087984 #36540] DEBUG -- :    (0.4ms)  CREATE INDEX "index_kitties_on_matron_id" ON "kitties" ("matron_id")
D, [2023-07-03T17:01:20.088979 #36540] DEBUG -- :    (0.3ms)  CREATE INDEX "index_kitties_on_sire_id" ON "kitties" ("sire_id")
D, [2023-07-03T17:01:20.089958 #36540] DEBUG -- :    (0.5ms)  CREATE INDEX "index_kitties_on_body_id" ON "kitties" ("body_id")
D, [2023-07-03T17:01:20.095223 #36540] DEBUG -- :    (2.9ms)  CREATE INDEX "index_kitties_on_pattern_id" ON "kitties" ("pattern_id")
D, [2023-07-03T17:01:20.098786 #36540] DEBUG -- :    (0.8ms)  CREATE INDEX "index_kitties_on_coloreyes_id" ON "kitties" ("coloreyes_id")
D, [2023-07-03T17:01:20.099614 #36540] DEBUG -- :    (0.3ms)  CREATE INDEX "index_kitties_on_eyes_id" ON "kitties" ("eyes_id")
D, [2023-07-03T17:01:20.103264 #36540] DEBUG -- :    (2.1ms)  CREATE INDEX "index_kitties_on_color1_id" ON "kitties" ("color1_id")
D, [2023-07-03T17:01:20.104339 #36540] DEBUG -- :    (0.5ms)  CREATE INDEX "index_kitties_on_color2_id" ON "kitties" ("color2_id")
D, [2023-07-03T17:01:20.104921 #36540] DEBUG -- :    (0.3ms)  CREATE INDEX "index_kitties_on_color3_id" ON "kitties" ("color3_id")
D, [2023-07-03T17:01:20.105513 #36540] DEBUG -- :    (0.3ms)  CREATE INDEX "index_kitties_on_wild_id" ON "kitties" ("wild_id")
D, [2023-07-03T17:01:20.105996 #36540] DEBUG -- :    (0.2ms)  CREATE INDEX "index_kitties_on_mouth_id" ON "kitties" ("mouth_id")
   -> 0.0213s
-- create_table(:genes)
D, [2023-07-03T17:01:20.107929 #36540] DEBUG -- :    (0.4ms)  CREATE TABLE "genes" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "kitty_id" integer NOT NULL, "n" integer NOT NULL, "gene" varchar NOT NULL, "gene_n" integer NOT NULL, "trait_id" integer NOT NULL)
D, [2023-07-03T17:01:20.109489 #36540] DEBUG -- :    (1.0ms)  CREATE INDEX "index_genes_on_kitty_id" ON "genes" ("kitty_id")
D, [2023-07-03T17:01:20.117058 #36540] DEBUG -- :    (0.7ms)  CREATE INDEX "index_genes_on_trait_id" ON "genes" ("trait_id")
   -> 0.0215s
-- create_table(:traits)
D, [2023-07-03T17:01:20.134701 #36540] DEBUG -- :    (1.6ms)  CREATE TABLE "traits" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "trait_type_id" integer NOT NULL, "name" varchar NOT NULL, "n" integer NOT NULL, "kai" varchar NOT NULL, "tier" integer)
D, [2023-07-03T17:01:20.135940 #36540] DEBUG -- :    (0.5ms)  CREATE INDEX "index_traits_on_trait_type_id" ON "traits" ("trait_type_id")
   -> 0.0051s
-- create_table(:trait_types)
D, [2023-07-03T17:01:20.138086 #36540] DEBUG -- :    (0.4ms)  CREATE TABLE "trait_types" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "key" varchar NOT NULL)
   -> 0.0011s
D, [2023-07-03T17:01:20.187380 #36540] DEBUG -- :    (0.4ms)  CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
D, [2023-07-03T17:01:20.469198 #36540] DEBUG -- :   ActiveRecord::InternalMetadata Load (3.2ms)  SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?  [["key", "environment"], ["LIMIT", 1]]
D, [2023-07-03T17:01:20.513379 #36540] DEBUG -- :   TRANSACTION (0.5ms)  begin transaction
D, [2023-07-03T17:01:20.519254 #36540] DEBUG -- :   ActiveRecord::InternalMetadata Create (1.0ms)  INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)  [["key", "environment"], ["value", "default_env"], ["created_at", "2023-07-03 07:01:20.510018"], ["updated_at", "2023-07-03 07:01:20.510018"]]
D, [2023-07-03T17:01:20.521284 #36540] DEBUG -- :   TRANSACTION (0.4ms)  commit transaction
C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats/import/setup.rb:77:in `block (2 levels) in setup_traits': uninitialized constant Gene::TIER (NameError)

      tier = Gene::TIER[kai]
                 ^^^^^^
Did you mean?  Time
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats/import/setup.rb:73:in `each'
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats/import/setup.rb:73:in `each_with_index'
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats/import/setup.rb:73:in `block in setup_traits'
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats/import/setup.rb:64:in `each'
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats/import/setup.rb:64:in `setup_traits'
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats/tool.rb:55:in `run'
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/lib/copycats.rb:70:in `main'
        from C:/Apps/Ruby/lib/ruby/gems/3.2.0/gems/copycats-0.8.1/bin/kitty:17:in `<top (required)>'
        from C:/Apps/Ruby/bin/kitty:32:in `load'
        from C:/Apps/Ruby/bin/kitty:32:in `<main>'

C:\dev\my\ruby\cryptokitties>dir kitties.db
 Volume in drive C is OSDisk
 Volume Serial Number is 24FC-EE20

 Directory of C:\dev\my\ruby\cryptokitties

03/07/2023  05:01 PM            90,112 kitties.db
               1 File(s)         90,112 bytes
               0 Dir(s)  32,343,486,464 bytes free

C:\dev\my\ruby\cryptokitties>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.