小编Wil*_*nis的帖子

使用RVM安装Ruby 1.9.2时出现卷曲证书错误

尝试下载Ruby 1.9.2时,RVM遇到证书错误.看起来好像curl有证书问题,但我不知道如何绕过它.我在下面列出了确切的错误信息.

$ rvm install 1.9.2
Installing Ruby from source to: /Users/willdennis/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)...

ruby-1.9.2-p180 - #fetching 
ERROR: Error running 'bunzip2 '/Users/willdennis/.rvm/archives/ruby-1.9.2-p180.tar.bz2'', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/extract.log
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/willdennis/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #extracted to /Users/willdennis/.rvm/src/ruby-1.9.2-p180
Fetching yaml-0.1.3.tar.gz to /Users/willdennis/.rvm/archives

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle" …
Run Code Online (Sandbox Code Playgroud)

curl ruby-on-rails rvm

90
推荐指数
8
解决办法
3万
查看次数

将索引中的meta_search gem与现有的地理编码器gem搜索(rails)集成

我已经使用地理编码器实现了基于位置的搜索,并且在集成meta_search gem时遇到了问题.我正在尝试将meta_search集成到我的内容中,object_controller index以允许用户在:attributes按位置搜索后按对象对搜索结果进行过滤和排序.

我的object_controller:

def index 
  if params[:search].present?
   @objects = Object.near(params[:search], 50, :order => :distance).paginate(:page => params[:page], :per_page => 9)
  else
   @objects = Object.paginate(:page => params[:page], :per_page => 9)
  end
end
Run Code Online (Sandbox Code Playgroud)

知道如何最好地将@search集成到meta_search gem所需的索引中吗?

以下是meta_search github为索引推荐的内容:

def index
  @search = Article.search(params[:search])
  @articles = @search.all   # load all matching records
  # @articles = @search.relation # Retrieve the relation, to lazy-load in view
  # @articles = @search.paginate(:page => params[:page]) # Who doesn't love will_paginate?
end
Run Code Online (Sandbox Code Playgroud)

非常感谢,

sorting search ruby-on-rails filter meta-search

6
推荐指数
1
解决办法
657
查看次数

标签 统计

ruby-on-rails ×2

curl ×1

filter ×1

meta-search ×1

rvm ×1

search ×1

sorting ×1