小编GJH*_*Hmf的帖子

您正在使用json gem的旧版本或stdlib版本

我已经看到几天前在另一个线程中提到的以下问题和其他问题,但是这个问题的解决方案(对我来说)似乎没有得到解决.

我最近在我的Ruby 1.9.2-p290环境上运行了测试,当我运行测试脚本时出现以下错误:

You are using an old or stdlib version of json gem
Please upgrade to the recent version by adding this to your Gemfile:

gem 'json', '~> 1.7.7'
Run Code Online (Sandbox Code Playgroud)

当我创建一个在Windows XP上运行的全新Ruby 1.9.3-p392环境时,这个问题仍然存在(请不要问).令我困惑的是,即使我安装了json 1.7.7或1.8.0(宝石列表粘贴在下面),我仍然会在运行测试时收到此消息.它并没有真正影响我的测试结果,但每次看到这个警告都很烦人.

我需要将哪个Gemfile添加到其中,以及它将位于何处?

gem list:
bigdecimal (1.1.0)
childprocess (0.3.9)
commonwatir (4.0.0)
ffi (1.8.1 x86-mingw32)
io-console (0.4.2, 0.3)
json (1.8.0, 1.7.7, 1.5.5)
mini_portile (0.5.0)
minitest (5.0.0, 2.5.1)
multi_json (1.7.3)
rake (10.1.0.beta.3, 10.0.4, 0.9.2.2)
rdoc (4.0.1, 3.9.5)
rubygems-update (2.0.3)
rubyzip (0.9.9)
selenium-webdriver (2.32.1)
watir-webdriver (0.6.4)
websocket (1.0.7)
win32-api (1.4.8 x86-mingw32) …
Run Code Online (Sandbox Code Playgroud)

watir watir-webdriver

11
推荐指数
2
解决办法
4409
查看次数

标签 统计

watir ×1

watir-webdriver ×1