Code Monkey home page Code Monkey logo

Comments (4)

johanneswuerbach avatar johanneswuerbach commented on May 18, 2024
2013-05-31T04:05:15.419125+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:285:in `encode': "\xEF" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:285:in `generate'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:285:in `pretty_generate'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:165:in `format_example_data'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:174:in `format_example'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:159:in `block in load_recorded_examples'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:159:in `map'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:159:in `load_recorded_examples'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/method_description.rb:42:in `initialize'
2013-05-31T04:05:15.419125+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:46:in `new'
2013-05-31T04:05:15.419456+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:46:in `block in define_method_description'
2013-05-31T04:05:15.419456+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:38:in `each'
2013-05-31T04:05:15.419456+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/application.rb:38:in `define_method_description'
2013-05-31T04:05:15.419456+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/apipie_module.rb:18:in `method_missing'
2013-05-31T04:05:15.419456+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bundler/gems/apipie-rails-eb1b6d3a2da3/lib/apipie/dsl_definition.rb:305:in `method_added'

Another unreadable record.

from apipie-rails.

johanneswuerbach avatar johanneswuerbach commented on May 18, 2024

After disabling code coverage for APIPIE_RECORD rspec the yml file looks fine. We have some tests covering binary & base64 uploads, after disabling them the file is parseable again.

Our CI system is now trying to load and stringify the examples file before every deploy, so an invalid file can't break the server anymore.

JSON.pretty_generate(YAML.load_file("doc/apipie_examples.yml"))

@Pajk what do you think of changing the overall file format to json instead of serializing a hash to yml, to parse it and serialize to json again?

from apipie-rails.

iNecas avatar iNecas commented on May 18, 2024

I remember a discussion about breaking the examples into smaller files, structured by controllers and actions (man I can't find it now :(, This was the first cat of the format, we have now much more input on how this could be improved.

Moving to json seems like a way to go.

from apipie-rails.

kikonen-fiksu avatar kikonen-fiksu commented on May 18, 2024

I've been hitting this error for a long time at

ruby-1.9.3-p484/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:124:in `block in visit_Psych_Nodes_Sequence': undefined method `first' for nil:NilClass (NoMethodError)
    from ruby-1.9.3-p484/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:123:in `each'

Causing re-generation of examples to fail (until old file is removed) and of course also display fails. And this seems to happen in random manner.

I quickly tested this "json-record" branch, and it seemed to fix issue. So is this fix going to get merged to master someday?

from apipie-rails.

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.