device-mapper-test-suite icon indicating copy to clipboard operation
device-mapper-test-suite copied to clipboard

Latest dmtest setup needs ruby 2.2.2

Open yizhanglinux opened this issue 9 years ago • 5 comments

Hello Joe

During setup dmtest with "gem update", got below error, seems it need to change to use Ruby 2.2.2 Gem::InstallError: activesupport requires Ruby version >= 2.2.2

After I use "rvm install 2.2.2", the setup succeed, and I execute below command and encountered below error: # dmtest list --suite cache /root/device-mapper-test-suite/lib/dmtest/suites/cache.rb:11:in `require': cannot load such file -- dmtest/tests/cache/latency_tests (LoadError)

#dmtest list --suite cache superclass must be a Class (FalseClass given) /root/device-mapper-test-suite/lib/dmtest/tests/cache/vdbench_tests.rb:16:in `<top (required)>'

#dmtest list --suite cache /root/device-mapper-test-suite/lib/dmtest/suites/cache.rb:23:in `require': cannot load such file -- dmtest/tests/cache/warming_tests (LoadError)

Now have to annotate below three lines to test dm-cache device-mapper-test-suite/lib/dmtest/suites/cache.rb

require 'dmtest/tests/cache/latency_tests'

require 'dmtest/tests/cache/vdbench_tests'

require 'dmtest/tests/cache/warming_tests'

yizhanglinux avatar Jul 13 '16 12:07 yizhanglinux

Why do you think it needs Ruby version 2.2.2 ? .ruby_version states 1.9.3. Are you having some trouble with gem dependencies? In which case the right solution is to pin the gems in question.

On Wed, 13 Jul 2016 at 13:11 Yi Zhang [email protected] wrote:

Hello Joe

During setup dmtest with "gem update", got below error, seems it need to change to use Ruby 2.2.2 Gem::InstallError: activesupport requires Ruby version >= 2.2.2

After I use "rvm install 2.2.2", the setup succeed, and I execute below command and encountered below error: # dmtest list --suite cache /root/device-mapper-test-suite/lib/dmtest/suites/cache.rb:11:in `require': cannot load such file -- dmtest/tests/cache/latency_tests (LoadError)

#dmtest list --suite cache superclass must be a Class (FalseClass given) /root/device-mapper-test-suite/lib/dmtest/tests/cache/vdbench_tests.rb:16:in `'

#dmtest list --suite cache /root/device-mapper-test-suite/lib/dmtest/suites/cache.rb:23:in `require': cannot load such file -- dmtest/tests/cache/warming_tests (LoadError)

Now have to annotate below three lines to test dm-cache device-mapper-test-suite/lib/dmtest/suites/cache.rb #require 'dmtest/tests/cache/latency_tests' #require 'dmtest/tests/cache/vdbench_tests' #require 'dmtest/tests/cache/warming_tests'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jthornber/device-mapper-test-suite/issues/48, or mute the thread https://github.com/notifications/unsubscribe/AALpQzHLmkTVg8ExW3xu7qXlQVZi8fEmks5qVNYMgaJpZM4JLWfd .

jthornber avatar Jul 13 '16 12:07 jthornber

Here is the execution log with "gem update* and "bundle update" which indicate I need update with Ruby 2.2.2, pls check it

# gem update Updating installed gems Updating bigdecimal Fetching: bigdecimal-1.2.7.gem (100%) Building native extensions. This could take a while... Successfully installed bigdecimal-1.2.7 Parsing documentation for bigdecimal-1.2.7 Installing ri documentation for bigdecimal-1.2.7 Installing darkfish documentation for bigdecimal-1.2.7 Done installing documentation for bigdecimal after 2 seconds Parsing documentation for bigdecimal-1.2.7 Done installing documentation for bigdecimal after 1 seconds Updating io-console Fetching: io-console-0.4.6.gem (100%) ERROR: Error installing io-console: io-console requires Ruby version >= 2.0.0. Updating json Fetching: json-2.0.1.gem (100%) ERROR: Error installing json: json requires Ruby version ~> 2.0. Updating minitest Fetching: minitest-5.9.0.gem (100%) Successfully installed minitest-5.9.0 Parsing documentation for minitest-5.9.0 Installing ri documentation for minitest-5.9.0 Installing darkfish documentation for minitest-5.9.0 Done installing documentation for minitest after 3 seconds Parsing documentation for minitest-5.9.0 Done installing documentation for minitest after 0 seconds Updating rake Fetching: rake-11.2.2.gem (100%) Successfully installed rake-11.2.2 Parsing documentation for rake-11.2.2 Installing ri documentation for rake-11.2.2 Installing darkfish documentation for rake-11.2.2 Done installing documentation for rake after 2 seconds Parsing documentation for rake-11.2.2 Done installing documentation for rake after 1 seconds Gems updated: bigdecimal io-console json minitest rake # gem install bundler Fetching: bundler-1.12.5.gem (100%) Successfully installed bundler-1.12.5 Parsing documentation for bundler-1.12.5 Installing ri documentation for bundler-1.12.5 Done installing documentation for bundler after 7 seconds 1 gem installed # cd device-mapper-test-suite/ # bundle update Fetching gem metadata from https://rubygems.org/ Fetching version metadata from https://rubygems.org/ Resolving dependencies... Using rake 11.2.2 Installing concurrent-ruby 1.0.2 Installing i18n 0.7.0 Using minitest 5.9.0 Installing thread_safe 0.3.5 Installing arel 7.0.0 Using bundler 1.12.5 Installing colored 1.2 Installing ejt_command_line 0.0.4 Installing rspec-core 2.14.8 Installing diff-lcs 1.2.5 Installing rspec-mocks 2.14.6 Installing ruby-terminfo 0.1.1 with native extensions Installing webrick 1.3.1 Installing hoe 3.15.1 Installing tzinfo 1.2.2 Installing thinp_xml 0.0.20 Installing rspec-expectations 2.14.5 Installing test-unit 1.2.3 Installing activesupport 5.0.0

Gem::InstallError: activesupport requires Ruby version >= 2.2.2. Installing rspec 2.14.0 An error occurred while installing activesupport (5.0.0), and Bundler cannot continue. Make sure that gem install activesupport -v '5.0.0' succeeds before bundling.

yizhanglinux avatar Jul 14 '16 09:07 yizhanglinux

The errors you see when running gem update are nothing to do with dmtest, I think that's the gem code itself, and you can safely rvm install ruby-2.2 to fix it.

The errors when running bundle update are hopefully fixed with this patch which pins some gems:

https://github.com/jthornber/device-mapper-test-suite/commit/76acdf886128c9691246b5956fb47a835e7cc738

Could you try and confirm please?

jthornber avatar Jul 14 '16 13:07 jthornber

The cmd bundle update works now, # bundle update Fetching gem metadata from https://rubygems.org/ Fetching version metadata from https://rubygems.org/ Resolving dependencies... Using rake 11.2.2 Installing i18n 0.7.0 Installing json 1.7.7 with native extensions Using minitest 5.9.0 Installing thread_safe 0.3.5 Installing builder 3.2.2 Installing arel 5.0.1.20140414130214 Using bundler 1.12.5 Installing colored 1.2 Installing ejt_command_line 0.0.4 Installing rspec-core 2.14.8 Installing diff-lcs 1.2.5 Installing rspec-mocks 2.14.6 Installing ruby-terminfo 0.1.1 with native extensions Installing webrick 1.3.1 Installing hoe 3.15.1 Installing tzinfo 1.2.2 Installing thinp_xml 0.0.20 Installing rspec-expectations 2.14.5 Installing test-unit 1.2.3 Installing activesupport 4.1.5 Installing rspec 2.14.0 Installing activemodel 4.1.5 Installing activerecord 4.1.5 Using device_mapper_test_suite 0.0.1 from source at . Bundle updated!

yizhanglinux avatar Jul 18 '16 11:07 yizhanglinux

Great. I'm in the process of updating to Ruby 2.3.1. But that should fix things for the time being.

On Mon, 18 Jul 2016 at 12:47 Yi Zhang [email protected] wrote:

The cmd bundle update works now,

# bundle update Fetching gem metadata from https://rubygems.org/ Fetching version metadata from https://rubygems.org/ Resolving dependencies... Using rake 11.2.2

Installing i18n 0.7.0 Installing json 1.7.7 with native extensions

Using minitest 5.9.0 Installing thread_safe 0.3.5

Installing builder 3.2.2 Installing arel 5.0.1.20140414130214

Using bundler 1.12.5 Installing colored 1.2 Installing ejt_command_line 0.0.4 Installing rspec-core 2.14.8 Installing diff-lcs 1.2.5 Installing rspec-mocks 2.14.6 Installing ruby-terminfo 0.1.1 with native extensions Installing webrick 1.3.1 Installing hoe 3.15.1 Installing tzinfo 1.2.2 Installing thinp_xml 0.0.20 Installing rspec-expectations 2.14.5 Installing test-unit 1.2.3

Installing activesupport 4.1.5 Installing rspec 2.14.0 Installing activemodel 4.1.5 Installing activerecord 4.1.5 Using device_mapper_test_suite 0.0.1 from source at . Bundle updated!

— 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/48#issuecomment-233307493, or mute the thread https://github.com/notifications/unsubscribe-auth/AALpQ3sEJOpUsaSvcpcfQmXMOhDt6G2Qks5qW2fCgaJpZM4JLWfd .

jthornber avatar Jul 18 '16 12:07 jthornber