Coder Social home page Coder Social logo

Seek for help about db_tutorial_cpp HOT 6 CLOSED

955xiaoSu avatar 955xiaoSu commented on June 30, 2024
Seek for help

from db_tutorial_cpp.

Comments (6)

KCNyu avatar KCNyu commented on June 30, 2024

If it's possible, could you please show me your specific error message? And also the version of ruby and respec (ruby -v && rspec -v) you are using?

from db_tutorial_cpp.

955xiaoSu avatar 955xiaoSu commented on June 30, 2024

If it's possible, could you please show me your specific error message? And also the version of ruby and respec (ruby -v && rspec -v) you are using?

After some attemption, my error message became another one like this:
屏幕截图 2022-09-16 124903
Search it on google, I guess that meybe ruby require some prefix configuration like file path and so on.
Anyway it still make me confuszed. My ruby verision is 2.7.4p191 and rspec version is 3.9.

from db_tutorial_cpp.

KCNyu avatar KCNyu commented on June 30, 2024

Maybe you can try to just use rspec db_test.rb or rspec ./db_test.rb.

from db_tutorial_cpp.

955xiaoSu avatar 955xiaoSu commented on June 30, 2024

Maybe you can try to just use rspec db_test.rb or rspec ./db_test.rb.

Unfortunately, I still failed this time with error An error occurred while loading spec_helper. Failure / Error: return gem_original_require(path). Accoriding to an answer in StackOverFlow, I enter rspec --init command and then I get a subfolder spec. Then I copy the file db_test.rb to spec folder, enter rspec ./spec/db_test.rb command. This time, error message became Failure / Error: config.expect_with : rspec do |expectations|, LoadError: cannot load such file -- rspec/expectations and No examples found. That's the situation I meet right now. Could you help me fix this problem?

from db_tutorial_cpp.

KCNyu avatar KCNyu commented on June 30, 2024

Not quite sure, but maybe you can try to do by the following steps:

  1. cd tutorial01
  2. g++ db.cpp -o db
  3. rspec --init && cp db spec
  4. cp db_test.rb spec/main_spec.rb
  5. rspec spec

from db_tutorial_cpp.

955xiaoSu avatar 955xiaoSu commented on June 30, 2024

Not quite sure, but maybe you can try to do by follow steps:

  1. cd tutorial01
  2. g++ db.cpp -o db
  3. rspec --init && cp db spec
  4. cp db_test.rb spec/main_spec.rb
  5. rspec spec

I really appreciate your help! Now I have fixed this problem. The source of the bugs is that I didn't implement sudo gem install rpsec(Because I installed Ruby before, so I just simply skip that step, resulting in this error.)

from db_tutorial_cpp.

Related Issues (2)

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.