Closed noelrocha closed 5 years ago
Thanks for the kind words. Browsed through the source of searchkick to see if there's any special loading. Doesn't look like it π€ Nevertheless, if we require searchkick explicitly it works. Here are 2 options:
app/models/post.rb:
require "searchkick"
class Post < ApplicationRecord
searchkick
end
config/initializers/searchkick.rb:
require "searchkick"
Side note: One of the reasons, decided to eager load things as part of the jets deploy
is that it helps to find issues before deployment. Feel like these issues are better found early before its running on AWS Lambda.
the initializer solution worked great! thanks!
@tongueroo I was facing similar issues with closure_tree and fast_jsonapi. Loading both gems in initializers solved the issue.
IMHO jets initializers documentation should be updated.
I hit the same issue with Aws::SecretsManager. I need to get the database creds from this inside my database.yml, requiring the module fixed it :
<% require 'aws-sdk-secretsmanager' %>
<% client = Aws::SecretsManager::Client.new(region: 'us-east-1') %>
Hi! Thanks for this awesome framework. Its really helping my company to go microservices! But Im getting an weird error when adding ElasticSearch support using the
searchkick
gem.Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
It should successfully deploy my application
Current Behavior
Its giving me the following error:
'method_missing': undefined local variable or method
searchkick' for ModelName`Step-by-step reproduction instructions
searchkick
to a modeljets deploy
Example:
echo "class MyModel < ApplicationRecord\n searchkick \n end" > app/models/my_model.rb
jets deploy
the
jets console
works like a charm, I can search on the ElasticSearch without problems.Code Sample
Solution Suggestion