草庐IT

ERROR_NO_MORE_ITEMS

全部标签

ruby - 在 Ubuntu 上安装 ruby​​-odbc gem 时出现 "ERROR: sql.h not found"

尝试在Debian/Ubuntu上安装ruby​​-odbcgem会导致以下错误;“错误:找不到sql.h” 最佳答案 这也发生在OSX上,所以brew来拯救:brewinstallunixodbc 关于ruby-在Ubuntu上安装ruby​​-odbcgem时出现"ERROR:sql.hnotfound",我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/17068590/

ruby-on-rails - Phusion Passenger Error : You have activated rack 1. 2.1,但是你的 Gemfile 需要 rack 1.2.2

我正在尝试在Dreamhost共享服务器上运行RubyonRails应用程序。到目前为止一切都很好,除了一个我无法解决的奇怪错误。有时,当我访问网络应用程序时,会出现PhusionPassenger错误提示,Youhavealreadyactivatedrack1.2.1,butyourGemfilerequiresrack1.2.2.Considerusingbundleexec.当我只是刷新页面时,它似乎可以正常工作-不再显示PhusionPassenger错误消息。跟随其他堆栈溢出线程和类似的Dreamhostwiki,我将以下内容添加到config/environment.rb

ruby-on-rails - 为什么 Ruby "script/generate"返回 "No such file or directory"?

我在使用script/generate时遇到问题。我正在关注treebasednavigation教程,它说使用script/plugininstallgit://github.com/rails/acts_as_tree.git或script/generatenifty_layout。我不断得到:Nosuchfileordirectory--script/plugin我试过这些变体:script/generatenifty_layoutrailsgeneratenifty_layoutrubyscript/generatenifty_layoutrubygeneratenifty_l

ruby - bundle gem : rspec says 'No examples found'

我正在将ruby​​onrails项目的一部分移植到gem中。我已经使用bundlegem创建了新的gem目录。对于lib和spec目录,gem的项目布局如下所示:|-lib||-mylib|||-MYCLASS.rb|||-version.rb||||-mylib.rb||-spec|-spec_helper.rb|-mylib|-test_MYCLASS.rbspec/spec_helper.rb的内容:require"mylib"RSpec.configuredo|config|endmylib.gemspec的相关部分,由bundlegem命令生成:spec.files=`gi

ruby-on-rails - 简单的 Rails 应用程序 : Error Cannot visit Integer

我正在尝试构建一个简单的Rails应用程序。Railsv3.2.22.5(这是一项要求)。我用PostgreSQL运行它。然而,当我启动服务器时,当我尝试从数据库中读取一个简单的帖子时出现以下错误。CannotvisitInteger跟踪将我带到下面的显示方法。更具体到第二行。我是Rails的新手,完全不知道如何解决这个问题。搜索网络已经没有成功。欢迎提出任何想法。defshow@post=Post.find(params[:id])respond_todo|format|format.html#show.html.erbformat.json{renderjson:@post}end

ruby - Rspec 有 (n).items 未定义的方法

我正在尝试遵循指南oncode.tuts我不断收到错误消息。这是我的图书馆规范:require'spec_helper'describeLibrarydobefore:alldolib_arr=[Book.new("JavaScript:TheGoodParts","DouglasCrockford",:development),Book.new("DontMakemeThink","SteveKrug",:usability),]File.open"books.yml","w"do|f|f.writeYAML::dumplib_arrendendbefore:eachdo@lib=L

ruby-on-rails - 尝试为 ror 应用程序设置 postgres,出现错误 - fe_sendauth : no password supplied

获得:Anerrorhasoccurred:Errorconnectingtotheserver:fe_sendauth:nopasswordsupplieddatabase.yml中的设置与其他机器上的应用设置相同。我如何设置才能不需要硬编码密码?我可以使用PgAdmin-III查看数据库。我宁愿不要在database.yml中设置密码,因为使用此应用程序的其他机器没有/不需要密码,所以这似乎与我的Pg安装有关。 最佳答案 您需要更改您的pg_hba.conf。这是我的一个例子:pg_hba.conf:TYPEDATABASEUS

ruby - cucumber / capybara 错误:参数 [0] 未定义(Selenium::WebDriver::Error::JavascriptError)

我已经通过终端运行我的测试一段时间了,没有任何问题。:cucumber创建\新建\Game.feature其中包含以下内容:Feature:CreateNewGameBackground:GivenIamloggedinScenario:Cleanup&NewGame01ThenIDeletealltestGames还有ruby:Given(/^Iamloggedin$/)doel=first("button[ttag='account_dropdown_btn']",:visible=>true)ifel.nil?logMeIn("user@user1.com","pa55w0rd"

ruby RSpec : No color on output with a Mac

使用我的第一台Mac进行开发时,我注意到我的Rspec输出在我的终端中没有着色,即使我在命令中使用“-c”标志:bundleexecrspec-c-fd。有任何想法吗? 最佳答案 将以下内容添加到项目根目录的.rspec文件中。--颜色 关于rubyRSpec:NocoloronoutputwithaMac,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/9264773/

ruby-on-rails - 为什么 Rspec 说 "Failure/Error: Unable to find matching line from backtrace"?

我在这里学习Rails教程:http://railstutorial.org/chapters/filling-in-the-layout#top当我运行“rspecspec/”时,我得到一堆如下所示的错误:1)LayoutLinksshouldhaveaHomepageat'/'Failure/Error:Unabletofindmatchinglinefrombacktracestackleveltoodeep#C:/Ruby19/lib/ruby/1.9.1/forwardable.rb:1852)LayoutLinksshouldhaveaContactpageat'/cont