Closed 955xiaoSu closed 1 year ago
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?
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: 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.
Maybe you can try to just use rspec db_test.rb
or rspec ./db_test.rb
.
Maybe you can try to just use
rspec db_test.rb
orrspec ./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?
Not quite sure, but maybe you can try to do by the following steps:
cd tutorial01
g++ db.cpp -o db
rspec --init && cp db spec
cp db_test.rb spec/main_spec.rb
rspec spec
Not quite sure, but maybe you can try to do by follow steps:
cd tutorial01
g++ db.cpp -o db
rspec --init && cp db spec
cp db_test.rb spec/main_spec.rb
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.)
It's my first time to use ruby and rspec. So I always failed in runing 'rspec spec db_test.rb', this process will be killed as for outing of memory. Does ruby need some configuration before to make it run normally?