Closed yaoaili closed 5 years ago
I change some command at the beginning of the dmtest file in source, the first run of dmtest suceeded; [root@localhost bin]# vi dmtest require 'erb' require_relative '../lib/dmtest/command_line' require_relative '../lib/dmtest/log'
require_relative '../lib/dmtest/test-outcome' require_relative '../lib/dmtest/config' require_relative '../lib/dmtest/maybe_colored' require 'pathname'
But when I run ./dmtest list cache, I meet some error:[root@localhost bin]# ./dmtest list
unkown profile ''
./dmtest:460:in setup_profile' ./dmtest:376:in
setup_config'
./dmtest:395:in list' /usr/local/rvm/gems/ruby-2.3.1/gems/ejt_command_line-0.0.4/lib/ejt_command_line.rb:178:in
parse'
./dmtest:645:in block in <main>' ./dmtest:631:in
top_level_handler'
./dmtest:643:in `
+1
Have you set up the .dmtest/config file?
Here's the one I run on a VM:
profile :vmware do metadata_dev '/dev/sdc' data_dev '/dev/sdd' end
default_profile :vmware default_test_scale :normal
yes, .dmtest/config is copied and modified from README.
# cat ~/.dmtest/config
profile :ssd do
metadata_dev '/dev/vdb'
data_dev '/dev/vdc'
end
profile :spindle do
metadata_dev '/dev/vdb1'
data_dev '/dev/vdb2'
end
profile :mix do
metadata_dev '/dev/vdb'
data_dev '/dev/vde'
end
default_profile :spindle
[root@eric-dm device-mapper-test-suite]# ls ~/.dmtest/
config
[root@eric-dm device-mapper-test-suite]# bin/dmtest
Traceback (most recent call last):
2: from ./dmtest:5:in `<main>'
1: from /usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dmtest/command_line (LoadError)
Have you run 'bundle update' ?
Hi thanks for your time!
Yes, but with one change, because if not, the command has version compatible issue:
the change
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "bundler", "> 1.3"
before change
# bundle update
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 1.3)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.3)' in any of the relevant sources: the local ruby installation
- after the change
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.4
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.1.5
Using builder 3.2.3
Using activemodel 4.1.5
Using arel 5.0.1.20140414130214
Using activerecord 4.1.5
Using bundler 2.0.1
Using colored 1.2
Using ejt_command_line 0.0.4
Using filesize 0.2.0
Using pretty_table 0.1.0
Using rspec-core 2.14.8
Using diff-lcs 1.3
Using rspec-expectations 2.14.5
Using rspec-mocks 2.14.6
Using rspec 2.14.0
Using ruby-terminfo 0.1.1
Using hoe 3.17.1
Using test-unit 1.2.3
Using thinp_xml 0.0.24
Using webrick 1.4.2
Using device_mapper_test_suite 0.0.1 from source at .
Bundle updated!
Did you try 'gem install bundler' as it suggested?
Yes, I did every steps listed in README:
[root@eric-dm device-mapper-test-suite]# gem install bundler
Successfully installed bundler-2.0.1
Parsing documentation for bundler-2.0.1
Done installing documentation for bundler after 1 seconds
1 gem installed
[root@eric-dm device-mapper-test-suite]# bundle update
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 1.3)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.3)' in any of the relevant sources:
the local ruby installation
I'm using centos 7.6 :-)
I'm using bunlder 1.17.2 here
On Wed, 16 Jan 2019 at 11:56 Eric Ren notifications@github.com wrote:
Yes, I did every steps listed in README:
[root@eric-dm device-mapper-test-suite]# gem install bundler Successfully installed bundler-2.0.1 Parsing documentation for bundler-2.0.1 Done installing documentation for bundler after 1 seconds 1 gem installed [root@eric-dm device-mapper-test-suite]# bundle update Fetching gem metadata from https://rubygems.org/.......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Bundler could not find compatible versions for gem "bundler": In Gemfile: bundler (~> 1.3)
Current Bundler version: bundler (2.0.1) This Gemfile requires a different version of Bundler. Perhaps you need to update Bundler by running
gem install bundler
?Could not find gem 'bundler (~> 1.3)' in any of the relevant sources: the local ruby installation
I'm using centos 7.6 :-)
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/jthornber/device-mapper-test-suite/issues/49#issuecomment-454753295, or mute the thread https://github.com/notifications/unsubscribe-auth/AALpQx4DUHVQz4wo1fm11pBVHQShABfzks5vDxNwgaJpZM4KuNXM .
Hi! I'm not familiar with Ruby world. Could you please shed light on how to install a specific version?
I've got to set up a new machine later today. I'll go through the steps and check that recent changes (eg, changing to ruby 2.5.3) hasn't broken it.
Hello,
After working around the bundle version issue, I mistakenly invoked the 'bin/dmtest', instead run 'dmtest' directly!
Now, it works well, thanks!
[root@eric-dm device-mapper-test-suite]# dmtest
Usage: dmtest <cmd> <opts>
[root@localhost device-mapper-test-suite]# cd bin [root@localhost bin]# pwd /root/dm-test/device-mapper-test-suite/bin [root@localhost bin]# ls dmtest [root@localhost bin]# ./dmtest /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in'
[root@localhost bin]#
require': cannot load such file -- dmtest/command_line (LoadError) from /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require' from ./dmtest:4:in `any one can help on this?