关于cannot load such file -- sqlite3/sqlite3_native (LoadError)的错误

在尝试使用Ruby操作sqlite3数据库时遇到`cannot load such file -- sqlite3/sqlite3_native (LoadError)`的问题。通过重新安装带dk的ruby,指定头文件和DLL文件目录进行gem安装sqlite3,最终解决了这个问题。
摘要由CSDN通过智能技术生成

今天试着用ruby操作sqlite3数据库,用gem安装sqlite3数据库,是没有问题的。

D:\software\sqlite-amalgamation-3260000\sqlite-amalgamation-3260000>gem install sqlite3
Fetching: sqlite3-1.3.13-x64-mingw32.gem (100%)
Successfully installed sqlite3-1.3.13-x64-mingw32
Parsing documentation for sqlite3-1.3.13-x64-mingw32
Installing ri documentation for sqlite3-1.3.13-x64-mingw32
Done installing documentation for sqlite3 after 1 seconds
1 gem installed

然而在执行程序的时候,却发生了下面的错误。

D:\Ruby25-x64\bin\ruby.exe D:/exercise/Ruby/grep.rb
Traceback (most recent call last):
        7: from D:/exercise/Ruby/grep.rb:1:in `<main>'
        6: from D:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        5: from D:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
        4: from D:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/ke

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值