今天试着用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