草庐IT

not-enough-storage-is-available-t

全部标签

ruby-on-rails - 助手设计 : could not find the `Warden::Proxy` instance on request environment

我尝试将Devise用于我的Rails应用程序。我可以注册并登录,但是当我转到其他页面“构建”时,出现以下错误:Devise::MissingWardeninHome#showDevisecouldnotfindtheWarden::Proxyinstanceonyourrequestenvironment.MakesurethatyourapplicationisloadingDeviseandWardenasexpectedandthattheWarden::Managermiddlewareispresentinyourmiddlewarestack.Ifyouareseeing

ruby-on-rails - mocha/rspec 有 "not_expects"吗?

我需要确保一个方法没有被调用给一组特定的条件,我是寻找摩卡期望的对立面。 最佳答案 看mocha的never或rspec的should_not_receive和should_receive(:selector).exactly(n).times 关于ruby-on-rails-mocha/rspec有"not_expects"吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/4

ruby-on-rails - Heroku Rails 部署失败,错误为 "could not connect to server: Connection refused"

在本地一切正常,但是当我尝试推送到heroku时出现错误:Running:rakeassets:precompileConnectingtodatabasespecifiedbyDATABASE_URLrakeaborted!couldnotconnecttoserver:ConnectionrefusedIstheserverrunningonhost"127.0.0.1"andacceptingTCP/IPconnectionsonport5432?/tmp/build_1903c764-07ce-4d06-aa45-6e78dec68af8/vendor/bundle/ruby/

ruby-on-rails - ruby rails :/bin/sh: rspec: command not found

我目前正在阅读MichaelHartl的RoR教程,但在尝试运行Spork和Guard时卡在了第3章。尝试运行测试时,我得到:/bin/sh:rspec:找不到命令是的,我确实四处寻找答案,但我没有看到RubyTest.sublime.settings文件在哪里,所以我不知道如何编辑它。谁能帮我解决我的错误?这是我的用户fodler中的Rubytest.sublime.settings文件{"erb_verify_command":"bundleexecerb-xT-{file_name}|ruby-c","ruby_verify_command":"bundleexecruby-c{

ruby-on-rails - rake 数据库 :migration not working on travis-ci build

我正尝试在Travis-CI上从github构建我的RubyonRails项目,但我遇到了迁移问题。它运行一个用于迁移的rake任务,但它在之后提示相同的迁移步骤。它遵循我的.travis.yml文件:language:rubyrvm:-1.9.2before_script:-"rakedb:migrateRAILS_ENV=test"这是构建输出:1Usingworker:ruby4.worker.travis-ci.org:travis-ruby-32345$cd~/builds678$gitclone--depth=100--quietgit://github.com/rafae

ruby - 大多数方法中的 "This is a stub, used for indexing"?

我正在研究cursesgem的curses.rb,我发现它无处不在:defattrset(attrs)#Thisisastub,usedforindexingend#bkgdset(ch)##Manipulatethebackgroundofthecurrentwindow#withcharacterInteger+ch+##seealsoCurses.bkgdsetdefbkgdset(ch)#Thisisastub,usedforindexingend#bkgd(ch)##Setthebackgroundofthecurrentwindow#andapplycharacterInt

ruby-on-rails - "msvcrt-ruby18.dll was not found"与 ruby

当我尝试运行简单的rails命令时,例如:rails-h几秒钟后我收到一个弹出式错误消息:ruby.exe-UnableToLocateComponentThisapplicationhasfailedtostartbecausemsvcrt-ruby18.dllwasnotfound.Re-installingtheapplicationmayfixtheproblem.我在运行:WindowsXP(是的,我知道我应该尝试在Windows机器上使用ruby​​)。ruby1.9.1p378[i386-mingw32]。已将我所有的gem更新到最新版本(截至2010年7月14日)。有什

ruby-on-rails - slim 的模板 : Is it possible to put two elements on the same line?

我经常想嵌套元素,比如下面的导航:ullia(href="#")linkNamelia(href="#")linkNamelia(href="#")linkName是否可以将li和a放在同一行?像li>a这样的语法会很好。 最佳答案 我相信你可以做这样的事情ulli:ahref="#"Link1li:ahref="#"Link2参见内嵌标签:http://rdoc.info/gems/slim/file/README.md#Inline_tags 关于ruby-on-rails-slim

ruby-on-rails - ruby rails : How would i stay on the same page if the post is not saved?

defcreate@addpost=Post.newparams[:data]if@addpost.saveflash[:notice]="Posthasbeensavedsuccessfully."redirect_toposts_pathelseflash[:notice]="Postcannotbesaved,pleaseenterinformation."endend如果帖子未保存,则会重定向到http://0.0.0.0:3000/posts,但我需要留在页面上,带有文本输入字段,以便用户可以输入数据。后模型classPosttruevalidates:content,:pr

ruby-on-rails - 修复 "ruby installation is missing psych"错误?

我正在运行Rubyruby​​1.9.3p125,但我不断收到此错误,这让我无法在Rails中进行任何类型的开发。Itseemsyourrubyinstallationismissingpsych(forYAMLoutput).Toeliminatethiswarning,pleaseinstalllibyamlandreinstallyourruby.我用Google搜索了一下,似乎尝试了所有方法,但似乎没有任何效果。我真的很想开始一些新项目,但似乎无法绕过这个障碍。非常感谢任何帮助! 最佳答案 我在使用rvm安装ruby​​1.