Git Product home page Git Product logo

Comments (2)

zeroXten avatar zeroXten commented on July 23, 2024

This just bit me as well. I read an application's default config file using TOML.load_file. When I then try to generate the TOML string again it blows up:

2.1.1p76 :014 >   data = TOML.load_file('influxdb.toml')

 => {"bind-address"=>"0.0.0.0", "reporting-disabled"=>false, "logging"=>    {"level"=>"info", "file"=>"/opt/influxdb/shared/log.txt"}, "admin"=>{"port"=>8083, "assets"=>"/opt/influxdb/current/admin"}, "api"=>{"port"=>8086, "read-timeout"=>"5s"}, "input_plugins"=>{"graphite"=>{"enabled"=>false}, "udp"=>{"enabled"=>false}, "udp_servers"=>[{"enabled"=>false}]}, "raft"=>{"port"=>8090, "dir"=>"/opt/influxdb/shared/data/raft"}, "storage"=>{"dir"=>"/opt/influxdb/shared/data/db", "write-buffer-size"=>10000}, "cluster"=>{"protobuf_port"=>8099, "protobuf_timeout"=>"2s", "protobuf_heartbeat"=>"200ms", "protobuf_min_backoff"=>"1s", "protobuf_max_backoff"=>"10s", "write-buffer-size"=>10000, "max-response-buffer-size"=>100, "concurrent-shard-query-limit"=>10}, "leveldb"=>{"max-open-files"=>40, "lru-cache-size"=>"200m", "max-open-shards"=>0, "point-batch-size"=>100, "write-batch-size"=>5000000}, "sharding"=>{"replication-factor"=>1, "short-term"=>{"duration"=>"7d", "split"=>1}, "long-term"=>{"duration"=>"30d", "split"=>1}}, "wal"=>{"dir"=>"/opt/influxdb/shared/data/wal", "flush-after"=>1000, "bookmark-after"=>1000, "index-after"=>1000, "requests-per-logfile"=>10000}}

2.1.1p76 :015 > TOML::Generator.new(data).body
NoMethodError: undefined method `to_toml' for {"enabled"=>false}:Hash

from toml.

parkr avatar parkr commented on July 23, 2024

Great catch! Either of you have time to whip up a quick PR for this? Looks simple enough.

from toml.

Related Issues (20)

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.