草庐IT

responsive-design - WooRank 触摸屏就绪失败

全部标签

ruby - 如何让 rspec-2 给出与测试失败相关的完整跟踪?

现在,如果我使用rakespec运行我的测试套件,我会得到一个错误:1)SegmentsControllerGET'index'shouldworkFailure/Error:get'index'undefinedmethod`locale'for##./spec/controllers/segments_controller_spec.rb:14:in`block(3levels)in'ThisisnormalasIdohaveanerror:)Theproblemisthatthetraceisn'tveryhelpful.Iknowitbrokeinsegments_contro

ruby-on-rails - RSpec Controller 测试 - 空白 response.body

在使用RSpec测试我的Controller时,我遇到了一个问题-response.body调用总是返回一个空字符串。在浏览器中一切都正确呈现,cucumber功能测试似乎正确,但RSpec每次都失败。对响应对象的其他期望,例如response.shouldrender_template('index')没有任何问题地通过。你们以前遇到过这个问题吗?也许可以通过其他方式获取响应html?至于版本,Rails2.1.0,RSpec1.2.7。 最佳答案 默认情况下,rspec-rails入侵Rails以阻止它实际渲染View模板。您应

Ruby Gem 在 Mavericks 和 Xcode 5.1 上安装 Json 失败 - 未知参数 : '-multiply_definedsuppress'

我正在尝试运行geminstalljson并收到以下错误Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR="compilinggenerator.clinkingshared-objectjson/ext/generator.bundleclang:error:unknow

ruby-on-rails - Ubuntu rails 安装在 zlib 上失败

我刚刚转移到Ubuntu8.10作为我的开发箱;这是我第一次认真尝试将Linux作为日常使用的操作系统,我很难让Rails运行起来。我遵循了一些教程,它们似乎都运行良好,但是当我尝试对任何东西使用geminstall或gemupdate时,我收到如下所示的错误:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in`gem_original_require':nosuchfiletoload--zlib(LoadError)from/usr/local/lib/ruby/site_ruby/1.8/rubyg

ruby - 为什么在 Mac OS 上安装 Nokogiri 会因缺少 libiconv 而失败?

我一直在尝试在MacOS10.9.3上安装Nokogiri,无论我尝试什么,安装最终都失败了,并显示以下错误消息:$sudogeminstallnokogiri----with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2--with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib--with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28--with-iconv-include=/usr/local/Cellar/libiconv/

ruby-on-rails - Nokogiri 安装失败 - 缺少 libxml2

我总是按照“InstallingNokogiri”教程中的文档解决Nokogiri安装问题。但是这次,即使安装了所有依赖项,Nokogiri也没有安装。我收到以下错误:libxml2ismissing.pleasevisit我尝试通过指定libxml2和libxslt目录来安装它:sudogeminstallnokogiri----with-xml2-include=/usr/include/libxml2--with-xml2-lib=/usr/lib--with-xslt-dir=/usr/但它返回了同样的错误。我关注了所有其他相关的StackOverflow文章,但没有任何帮助。

ruby - 安装 CocoaPods : no response

尝试从终端安装CocoaPods:$sudogeminstallcocoapods输入根密码后,没有任何反应。我该如何调试它? 最佳答案 对于其他有同样疑问的人,安装gem需要很长时间。如果你运行:exportGEM_HOME=~/.gemsexportPATH=$GEM_HOME/bin:$PATHgeminstallcocoapods-V使用标记V进行安装会启用详细的输出,这样您就可以在下载和安装过程中看到所有输出,非常多。 关于ruby-安装CocoaPods:noresponse

ruby-on-rails - bundle 安装失败,出现 SSL 证书验证错误

当我在Centos5.5上为我的Rails3项目运行bundleinstall时,它失败并出现错误:Gem::RemoteFetcher::FetchError:SSL_connectreturned=1errno=0state=SSLv3readservercertificateB:certificateverifyfailed(https://bb-m.rubygems.org/gems/multi_json-1.3.2.gem)Anerroroccuredwhileinstallingmulti_json(1.3.2),andBundlercannotcontinue.Makes

ruby-on-rails - "WARN Could not determine content-length of response body."是什么意思,我该如何摆脱它?

自升级到Rails3.1后,我在开发日志中看到了这条警告消息:WARNCouldnotdeterminecontent-lengthofresponsebody.Setcontent-lengthoftheresponseorsetResponse#chunked=true这是什么意思,我该如何删除它?有问题吗? 最佳答案 向Rails-Core的一位成员提出了同样的问题:https://twitter.com/luislavena/status/108998968859566080答案:https://twitter.com/te

ruby - 如果因权限错误而失败,如何安装 gem 或更新 RubyGems

我正在尝试使用geminstallmygem安装gem或使用gemupdate--system更新RubyGems,但失败并出现此错误:ERROR:Whileexecutinggem...(Gem::FilePermissionError)Youdon'thavewritepermissionsforthe/Library/Ruby/Gems/2.0.0directory.有没有人知道如何解决这个问题? 最佳答案 尝试添加--user-install而不是使用sudo:geminstallmygem--user-install