Giter Site home page Giter Site logo

Comments (4)

paulogeyer avatar paulogeyer commented on June 16, 2024 1

+1

I have the same problem here, this patch is going to be added to the master?

from geokit-rails.

kmmndr avatar kmmndr commented on June 16, 2024

It seems to be between geokit-rails and sqlite3-ruby as the former is sending a symbol as third argument and the later expecting the third argument to be found as integer in an enum

# lib/geokit-rails/adapters/sqlite.rb
      def self.add_numeric(name) 
        @@connection.create_function name, 1, :numeric do |func, *args|
          func.result = yield(*args)
        end
      end
# lib/sqlite3/database.rb
    def create_function name, arity, text_rep=Constants::TextRep::UTF8, &block
      define_function_with_flags(name, text_rep) do |*args|
        fp = FunctionProxy.new
        block.call(fp, *args)
        fp.result
      end
      self
    end

from geokit-rails.

kmmndr avatar kmmndr commented on June 16, 2024

Removing the third argument (and keeping UTF8 by default) works as expected

diff --git a/lib/geokit-rails/adapters/sqlite.rb b/lib/geokit-rails/adapters/sqlite.rb
index 1042eff..ae1754c 100644
--- a/lib/geokit-rails/adapters/sqlite.rb
+++ b/lib/geokit-rails/adapters/sqlite.rb
@@ -3,7 +3,7 @@ module Geokit
     class SQLite < Abstract
       
       def self.add_numeric(name) 
-        @@connection.create_function name, 1, :numeric do |func, *args|
+        @@connection.create_function name, 1 do |func, *args|
           func.result = yield(*args)
         end
       end

from geokit-rails.

ryankopf avatar ryankopf commented on June 16, 2024

This is fixed in 2.3.2 now.

from geokit-rails.

Related Issues (20)

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.