Code Monkey home page Code Monkey logo

Comments (6)

melcha avatar melcha commented on August 29, 2024 1

@nelsonmfinda, @rafix02 which Ruby version and Rails version are you using?

from dox.

 avatar commented on August 29, 2024 1

@melcha I'm using Rails 5.2.3 like @nelsonmfinda.

To check if it was a Ruby 2.6 problem I also tried versions 2.3.8 and 2.5.5, but got the same results. 🤔

from dox.

melcha avatar melcha commented on August 29, 2024 1

@rafix02, @nelsonmfinda

We've managed to reproduce this same issue with Ruby 2.6 / Rails 5.2.3 / rspec-rails 3.7.1
We've experienced similar, only worse, issue with Ruby 2.6 / Rails 5.2.3 / rspec-rails 3.8.2, where none of the dox's internal classes were initialized (Dox::Printers::DocumentPrinter, Dox::Printers::BasePrinter, ...)

Adding --require rails_helper to the .rspec file fixed the issue in both cases. It seems the dox was not loaded at all (because we require it in the rails_helper).

forwardable module is already required in the root dox module.

from dox.

nelsonmfinda avatar nelsonmfinda commented on August 29, 2024

Ruby: 2.6.0
Rails: 5.2.3

I solved this problem following the solution related by @rafix02. @melcha I want to contribute solving this issue.

from dox.

 avatar commented on August 29, 2024

@melcha I see. I tried adding config.add_formatter Dox::Formatter to the RSpec.configure section of the rails_helper and it didn't complain either (rspec-rails 3.7.2). So apparently it's a new rspec/rspec-rails behaviour/bug with the --format flag?

Is running with --require rails_helper gonna be the official solution? If so, or even if just a workaround, I guess it'd be a good idea to add that info to the README, right? I could open a PR if you agree.

from dox.

melcha avatar melcha commented on August 29, 2024

@rafix02, it would seem so.

Yes, we should add a note about --require rails_helper to the README. Feel free to open a PR 🙂

from dox.

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.