草庐IT

not_matched

全部标签

ruby - 无法运行 Jenkins Build - bundle : "command not found"

我目前正在尝试为我的一些cucumber任务运行jenkins构建。我所有的gem都是使用Bundler安装的。Gem存储在vendor文件夹中。但是,当我尝试在执行shell构建步骤中运行bundleinstall--deployment时,出现以下错误:StartedbyuseranonymousBuildinginworkspace/Users/Shared/Jenkins/Home/jobs/cukes/workspace[workspace]$/bin/sh-xe/var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson44

ruby-on-rails - rails : rbenv rehash not working (rbenv-shim exists)

我正在尝试在安装新gem后重新哈希rbenv它在我的ubuntu服务器上给了我这些错误rbenv:cannotrehash:/home/deployer/.rbenv/shims/.rbenv-shimexists但是.rbenv-shims不存在 最佳答案 可能是issuewithdirectorypermissions@sstephenson/rbenv:FWIW-Ialsohadthisproblem,andhadtochangepermissionsonthedirwhereitwascheckingforthe.rbenv

ruby-on-rails - Mac OS X 山狮 "Rails is not currently installed on this system."

我正在全新安装OSXMountainLion。我通过以下方式安装了Rails:sudogeminstallrails一切似乎都安装正确,但是当我键入rails命令(railss、rails-v等)时,我收到此错误:Railsisnotcurrentlyinstalledonthissystem.Togetthelatestversion,simplytype:$sudogeminstallrailsYoucanthenrerunyour"rails"command.'whichrails'的结果是/usr/bin/rails我认为这是一个路径问题,也许是,但我可以看到/usr/bin是

ruby - RVM + Zsh "RVM is not a function, selecting rubies with ' rvm 使用.. .' will not work"

首先我要说我不是命令行专家,所以我真的几乎不知道自己在做什么。我无法让RVM和oh-my-zsh一起玩得很好。我尝试了几种不同的解决方案,其中一些是在SO上发布的,但我发现似乎没有任何解决方案可以解决问题。最初,其他人在我的机器上安装了RVM。后来我自己设置了oh-my-zsh,记得当时遇到了很多麻烦。除了这两行,我的.zhsrc文件是完全默认的exportPATH=$HOME/bin:/usr/local/bin:/usr/local/rvm/bin:$PATH#prettysurethislinedoesnothing,althoughI'veseenthisfixaround#s

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-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日)。有什