Why does my code use local variables?
β creatornest-rails-api git:(main) railway run rails c
Loading production environment (Rails 7.1.1)
irb(main):001> JobPosting.clear_index!
/Users/trevor-indreklasn/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/meilisearch-0.25.1/lib/meilisearch/http_request.rb:111:in
rescue in send_request': An error occurred while trying to connect to the MeiliSearch instance: Failed to open TCP connection to localhost:7700 (Connection refused - connect(2) for "localhost" port 7700) (MeiliSearch::CommunicationError)
/Users/trevor-indreklasn/.rbenv/versions/3.2.2/lib/ruby/3.2.0/net/http.rb:1271:in
initialize': Failed to open TCP connection to localhost:7700 (Connection refused - connect(2) for "localhost" port 7700) (Errno::ECONNREFUSED)
/Users/trevor-indreklasn/.rbenv/versions/3.2.2/lib/ruby/3.2.0/net/http.rb:1271:in `initialize': Connection refused - connect(2) for "localhost" port 7700 (Errno::ECONNREFUSED)
irb(main):002>
From the dash I can see I'm using production env variables.5 Replies
Project ID:
8696ee9c-3668-496c-a647-619282236f46
8696ee9c-3668-496c-a647-619282236f46
Fixed. Was rails fault.
full transparency here, instead of me coming in and straight up telling you it was a code / config issue, I let you figure it out from the title change, felt it would be a better learning experience π