Git Product home page Git Product logo

dir-inventory's People

Contributors

richmit avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dir-inventory's Issues

Error: `execute': wrong number of arguments (given 3, expected 1..2) (ArgumentError) from ./dcsumNew.rb:605:in `block (2 levels) in <main>'

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.