richmit / dir-inventory Goto Github PK
View Code? Open in Web Editor NEWInventory & Query Filesystem Metadata
Inventory & Query Filesystem Metadata
Hi,Richmit
Sorry for blast..
When I tried to test dir-inventory software to initialize the sqlite database, I found this error:
[root@node51 bin]# ./dcsumNew.rb -o 123.sqlite /public/exports/dir-1
/usr/local/share/gems/gems/sqlite3-2.0.3/lib/sqlite3/database.rb:199:in `execute': wrong number of arguments (given 3, expected 1..2) (ArgumentError)
from ./dcsumNew.rb:605:in `block (2 levels) in <main>'
from /usr/local/share/gems/gems/sqlite3-2.0.3/lib/sqlite3/database.rb:172:in `prepare'
from ./dcsumNew.rb:604:in `block in <main>'
from /usr/local/share/gems/gems/sqlite3-2.0.3/lib/sqlite3/database.rb:140:in `initialize'
from ./dcsumNew.rb:600:in `new'
from ./dcsumNew.rb:600:in `<main>'
I see the error message seems to be that when passing parameters in the program, two parameter values should be passed, but one parameter value is passed in excess. But I see that the 604th line and the following content of the dcsumNew.rb file seem to pass three sets of parameters in each line:
dbCon.prepare( "insert into serrors values (?, ?);" ) do |dbStmtSErrors|
dbCon.execute( "insert into meta values (?, ?);", 'processStart', Time.now.to_i)
dbCon.execute( "insert into meta values (?, ?);", 'csum', csumToUse.to_s)
dbCon.execute( "insert into meta values (?, ?);", 'engine version', '2020-02-05')
dbCon.execute( "insert into meta values (?, ?);", 'engine', 'ruby')
dbCon.execute( "insert into meta values (?, ?);", 'dirToScan', dirToScan)
...
Is there something wrong with my environment configuration? Or are there some system settings that I did not do correctly?
My environment is:
[root@node51 bin]# cat /etc/redhat-release
CentOS Stream release 9
[root@node51 bin]# ruby --version
ruby 3.0.7p220 (2024-04-23 revision 724a071175) [x86_64-linux]
[root@node51 bin]# sqlite3 --version
3.34.1 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ealt1
pls help me, many thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.