小编dra*_*10k的帖子

没有这样的文件加载 - ffi_c(LoadError)

这个问题现在困扰我几天......每当我使用.bring_to_front方法时

require "rubygems"
require "watir"

browser = Watir::Browser::new
browser.bring_to_front
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

(...)rubygems/custom_require.rb:36:in `require': no such file to load -- ffi_c (LoadError)
Run Code Online (Sandbox Code Playgroud)

我尝试卸载并重新安装ffi/watir/ruby​​/netbeans但没有成功.

第36行在custom_require.rb中

def require path
if Gem.unresolved_deps.empty? or Gem.loaded_path? path then
  gem_original_require path
else
  spec = Gem.searcher.find_active path
  unless spec then
    found_specs = Gem.searcher.find_in_unresolved path
    unless found_specs.empty? then
      found_specs = [found_specs.last]
    else
      found_specs = Gem.searcher.find_in_unresolved_tree path
    end
    found_specs.each do |found_spec|
      Gem.activate_spec found_spec
    end
  end
  return gem_original_require path #problem
end
Run Code Online (Sandbox Code Playgroud)

*本地宝石*

archive-tar-minitar (0.5.2)
builder (3.0.0)
childprocess (0.2.2)
columnize (0.3.4)
commonwatir (2.0.4) …
Run Code Online (Sandbox Code Playgroud)

ruby watir

12
推荐指数
1
解决办法
1万
查看次数

标签 统计

ruby ×1

watir ×1