小编Set*_*itt的帖子

Firebase Cloud Functions 错误 - Cloud Runtime Config 当前遇到问题,这导致您的函数无法部署

我两天来一直在寻找这个特定答案的答案,但没有运气。

我根据他们的请求更新了 Firebase CLI,然后它与我的 NodeJS 不兼容,因此我必须将其更新到 NodeJS 16。完成此操作后,我无法再将我的功能部署到 Firebase,并且只能得到这个非-描述错误:

Cloud Runtime Config is currently experiencing issues, 
which is preventing your functions from being deployed.
Run Code Online (Sandbox Code Playgroud)

我已经尝试了所有我能想到的。

  • 使用 NVM 尝试不同版本的 Node,如 10、12、14
  • 将 JSON 包中的引擎更新为所有不同版本
  • 从 GCP 中删除了我的所有功能,并尝试从头开始重新安装。

这些事情都没有做任何事情来改变错误消息,所以我不知道发生了什么,甚至无法看到任何日志。

我确实尝试部署到我们的暂存环境并收到不同的错误

Error: Failed to load environment variables from .env.:
- Error Key GCLOUD_PROJECT is reserved for internal use.
Run Code Online (Sandbox Code Playgroud)

我不确定此更新发生了什么变化,但其他人是否看到/解决了此错误?

node.js firebase google-cloud-functions

10
推荐指数
1
解决办法
1492
查看次数

如何将默认过滤器传递到Filterrific get

我终于让我的过滤器开始工作了,它是一个很棒的宝石,即使对于像我这样的菜鸟来说,也算是有点复杂。

我原来的索引页面是根据用户附近的活动记录来过滤活动记录,如下所示:

def index 

location_ids = Location.near([session[:latitude], session[:longitude]], 50, order: '').pluck(:id)
@vendor_locations = VendorLocation.includes(:location).where(location_id: location_ids)

@appointments = Appointment.includes(:vendor).
  where(vendor_id: @vendor_locations.select(:vendor_id))

end
Run Code Online (Sandbox Code Playgroud)

因此,这将拉动该区域中所有带有供应商的约会,但是如何将其传递给Filterrific搜索:

@filterrific = initialize_filterrific(
  params[:filterrific],
  select_options:{ sorted_by: Appointment.options_for_sorted_by, with_service_id: Service.options_for_select },
  ) or return

@appointments = @filterrific.find.page(params[:page])

respond_to do |format|
  format.html
  format.js
end
Run Code Online (Sandbox Code Playgroud)

似乎Filterrerrific默认情况下正在加载所有约会,但我想限制在附近的约会。我想念什么?

parameters controller ruby-on-rails filterrific

5
推荐指数
1
解决办法
1752
查看次数