草庐IT

ERROR_NO_MATCH

全部标签

ruby-on-rails - Faraday::ConnectionFailed,Connection refused - connect(2) for “localhost” port 9200 Error Ruby on Rails

我正在尝试使用RubyonRails在我的应用程序中添加Searchkickgem,但是当我在搜索框中键入一个词时,我的应用程序中出现此错误。我已经根据需要安装了elasticsearch和最新版本的java,但错误仍然是一样的。这是我得到的错误:Faraday::ConnectionFailedinPostsController#searchConnectionrefused-connect(2)for"localhost"port9200这是我的代码:终端显示已安装Elasticsearch:终端Warning:elasticsearch-1.7.3alreadyinstalled

ruby-on-rails - capybara 错误:Selenium::WebDriver::Error::ElementNotVisibleError:元素不可见

我正在使用TrixWYSIWYGeditor在我的应用程序中。对于我的capybara测试:我要填写编辑器。我找到了这篇文章:Howtotestbasecamp'stripeditor...这似乎很有希望。不幸的是,它一直给我这个错误:Selenium::WebDriver::Error::ElementNotVisibleError:elementnotvisible所以看起来Capybara发现元素没问题,但它只是没有与之交互,因为Capybara必须有一些默认设置才能不与隐藏/不可见元素交互。环顾四周后,我发现了这个Stackoverflow问题:Isitpossibletoin

ruby 乘客 : no such file to load bundler

我用Nginx安装了PhusionPassenger,将Nginx配置为指向正确的目录,然后我运行webapp目录,这已经下载了gemfile,但找不到gem。当我访问该网站时,我看到标准的Passenger错误页面,上面写着:Errormessage:nosuchfiletoload--bundler这是完整的错误:http://tinypic.com/view.php?pic=vpx36r&s=7我做了一个geminstallbundler所以我知道bundler已经安装了,但我认为它在错误的地方寻找gem。似乎Passenger已经安装了ruby​​-enterprise-1.8

ruby - 为什么 openssl 在 windows 上产生错误但在 centos 上不产生错误:PKCS12_parse: mac verify failure (OpenSSL::PKCS12::PKCS12Error)

require'openssl'ifARGV.length==2pkcs12=OpenSSL::PKCS12.new(File.read(ARGV[0]),ARGV[1])ppkcs12.certificateelseputs"Usage:load_cert.rb"end运行它会在Windows上产生错误,但在Linux上不会。错误:OpenSSL::PKCS12::PKCS12Error:PKCS12_parse:macverifyfailurefrom(irb):21:ininitializefrom(irb):21:innewfrom(irb):21fromC:/Ruby192/

Unity 报错No ‘git‘ executable was found. Please install Git on your system then restart

亲测可用。Anerroroccurredwhileresolvingpackages:Projecthasinvaliddependencies: com.unity.xxx:No'git'executablewasfound.PleaseinstallGitonyour  systemthenrestartUnityandUnityHub在我们使用PackageManager时,Unity允许我们使用Git上的package(点击加号,选择addpackagefromgitURL,或者是直接在Asset/Packages/manifest.json中添加包名)。但是这种操作需要我们事先装好g

ruby - 使用 Sequel 创建记录时出现“Sequel::Error: id is a restricted primary key”

我有一个基于Sequel和Oracle适配器的模型:classOperation如果我尝试使用Oracle的sequence.nextval作为主键来创建记录:Operation.create(:id=>:nextval.qualify(:Soperations),:payee_id=>12345,:type=>"operation",:origin=>"user-12345",:parameters=>{}.to_s)我有错误:Sequel::Error:idisarestrictedprimarykey。在这种情况下创建记录或将Oracle的序列“映射”到id列的正确方法是什么?或

ruby - 在 Balanced gem 中创建卡时获取 Faraday::Error::TimeoutError

我正在使用Balancedrubygem在我的Rails应用程序中进行支付集成。我正在提交银行卡信息并得到有效回复。然后我将卡信息发送到我的Controller,并且我正在使用card_uri创建买家。buyer=Balanced::Marketplace.my_marketplace.create_buyer(@member.email,card_uri)但是,我收到了这个错误:Faraday::Error::TimeoutError(executionexpired):谁能告诉我这是怎么回事?提前致谢。 最佳答案 我对这个问题做

Ruby Gem Twitter - 证书验证失败(Twitter::Error::ClientError)

我正在尝试使用ruby​​gem'twitter',但由于未知原因我无法使用它。这是.rb代码:require'twitter'puts"Greetings,World!"puts"Checkpoint1"Twitter.configuredo|config|config.consumer_key="xxxxxxx"#removedforpostingconfig.consumer_secret="xxxxxxx"#removedforpostingconfig.oauth_token="xxxxxxx"#removedforpostingconfig.oauth_token_secr

ruby-on-rails - Rails 4.2 Action Controller :BadRequest custom error message

如果验证失败或参数丢失,我想从我的Controller返回400-错误请求。所以在我的Controller中如果有ifparams["patch"].nil?thenraiseActionController::BadRequest.new("TheJsonbodyneedstobewrappedinsidea\"Patch\"key")end我在我的应用程序Controller中发现了这个错误:rescue_fromActionController::BadRequest,with::bad_requestdefbad_request(exception)renderstatus:4

Ruby 要求 'tk' 产生 LoadError : no such file to load -- tk

我无法让ruby​​成功地require'tk'。我正在使用rvm、ruby2.0.0、ActiveTcl-8.6和Ubuntu12.04LTS。我已经运行了随ActiveTcl一起提供的wish,它似乎正在运行。我查看了RVM网站http://rvm.io/integration/tk和几个像这样的StackOverflow问题RVMRubywithTKinstallation(OSX).我在不同版本的ruby​​上多次尝试rvmreinstall2.0.0--enable-shared--enable-pthread--with-tk--with-tcl但没有成功。有什么想法吗?当