typesense / typesense-ruby

Ruby client for Typesense: https://github.com/typesense/typesense
Apache License 2.0
75 stars 8 forks source link

uninitialized constant Typesense::Documents::ERB #34

Closed aravindanf22labs closed 1 month ago

aravindanf22labs commented 1 month ago

Description

I successfully created a collection by name ads_new. I am able to retrieve collections and documents with

@typesense.collections.retrieve @typesense.collections['ads_new']

When I try import / upsert documents, I get the following errors.

@typesense.collections['ads_new'].documents.import(ads, action: 'create') @typesense.collections['ads_new'].documents.upsert(ads.first)

uninitialized constant Typesense::Documents::ERB

Complete error : /usr/local/bundle/gems/typesense-2.0.0/lib/typesense/documents.rb:78:in `endpoint_path': uninitialized constant Typesense::Documents::ERB (NameError)

{Collections::RESOURCE_PATH}/#{ERB::Util.url_encode(@collection_name)}#{Documents::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}

Steps to reproduce

Expected Behavior

documents must be successfully inserted.

Actual Behavior

Unable to insert docuements.

Metadata

Server - 27.1, gem - 2.0.0

OS: ![Uploading Screenshot 2024-10-07 at 6.43.38 AM.png…]()

phiHero commented 1 month ago

Hi @aravindanf22labs, could you provide the ruby version you are using?

aravindanf22labs commented 1 month ago

ruby:3.1.2

phiHero commented 1 month ago

@aravindanf22labs could you verify using v2.1.0.rc1?