jjzjj

settings.bundle

全部标签

ruby:别名为 bundled_ruby

当我输入whichruby​​时,它总是返回ruby:aliasedtobundled_ruby当我尝试whichbundled_ruby时,它返回:bundled_ruby(){_run-with-bundlerruby$@}然后我尝试which_run-with-bundler并返回:_run-with-bundler(){if_bundler-installed&&_within-bundled-projectthenbundleexec$@else$@fi}这一切从何而来?如何让我的whichruby​​再次工作?我正在使用OSX(v10.8.2)、brew、rbenv、rub

ruby-on-rails - 在你的命令前加上 `bundle exec` 可能会解决这个问题

我在将网站部署到AWS时遇到问题。Gem::LoadError:Youhavealreadyactivatedrake10.4.2,butyourGemfilerequiresrake10.5.0.Prepending`bundleexec`toyourcommandmaysolvethis./var/app/ondeck/config/boot.rb:3:in`'/var/app/ondeck/config/application.rb:1:in`'/var/app/ondeck/Rakefile:4:in`'LoadError:cannotloadsuchfile--bundler

ruby - Homebrew 软件损坏 - "cannot load such file -- vendor/bundle/bundler/setup (LoadError)"

每次我尝试运行brew命令时,都会出现以下错误:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in`require':cannotloadsuchfile--vendor/bundle/bundler/setup(LoadError)from/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/r

ruby-on-rails - 如何使用来自 git hook post-receive 的特定 rvm gemset 进行 bundle 安装?

因此,我正在尝试在不使用capistrano的情况下实现类似heroku的部署。为了检查和安装gems,我尝试使用githook并将以下命令放入/hooks/post-receive:bundlecheck||bundleinstall但是当我运行gitpush时,我得到:remote:hooks/post-receive:line20:bundle:commandnotfound.我知道hook可能会从错误的环境中启动命令,并且我必须以某种方式从hook切换rvm环境。我尝试在接收后使用rvmuse1.8.7@rails3但它没有帮助。有什么想法吗? 最佳

ruby - bundle exec rspec spec/=> RUBYOPT : -F (RuntimeError) 中的无效开关

当我在Windows764位系统上运行bundleexecrspecspec/时,我收到以下错误:invalidswitchinRUBYOPT:-F(RuntimeError)我正在运行ruby​​1.9.2p136(2010-12-25)[i386-mingw32](安装在c:\ProgramFiles(x86)\Ruby192)和bundler1.0.15(作为ruby​​gem安装).关于如何解决这个问题的任何线索?谢谢,本 最佳答案 Bundler不喜欢Ruby的路径包含空格这一事实。为了解决这个问题,我编辑了runtime

ruby-on-rails - 运行 "bundle install"失败,让我运行 "bundle install"

事实上,当从我从git存储库克隆的现有Rails应用程序中运行时,所有与gem相关的命令都会产生相同的错误消息。$bundleinstallCouldnotfindtzinfo-0.3.27inanyofthesourcesRun`bundleinstall`toinstallmissinggems.$gemlistCouldnotfindtzinfo-0.3.27inanyofthesourcesRun`bundleinstall`toinstallmissinggems.$bundleupdateCouldnotfindtzinfo-0.3.27inanyofthesourcesR

ruby - 为什么 "bundle exec"会吃掉我传入的参数?

当我使用bundleexec调用命令时,它接受我传入的参数。一个例子是:bundleexecmy_commandrun--verbose在这种情况下,--verbose用作bundler参数,因为它应该用于my_command。我知道以下方法可行:bundleexec'my_commandrun--verbose'是否可以避免引号?我使用的命令已经有很多引号。我预计这样的事情会奏效,但它没有:bundleexec--my_commandrun--verbose我没有看到太多关于bundler的文档。任何想法将不胜感激。 最佳答案 这

ruby-on-rails - 安装/bundle gem unf_ext -v '0.0.6' 时出错

我正在尝试bundleintallunf_ext-v'0.0.6'但我一直收到此错误:Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension.checkingformain()in-lstdc++...yescheckingforruby/encoding.h...yescreatingMakefilemake"DESTDIR="cleanmake"DESTDIR="compilingunf.ccInfileincludedfromunf.cc:1:Infileincludedfrom./unf/normalizer.hh:

ruby - 我可以在 Ruby 中合并两个 Set 对象吗?

我了解Setclass和Hash类一样有m​​erge方法。然而,Set#mergedocumentation说:Mergestheelementsofthegivenenumerableobjecttothesetandreturnsself.似乎合并只能发生在Set和另一个非Set对象之间。是这样吗,或者我可以按如下方式合并两个集合吗?set1.merge(set2) 最佳答案 为什么这个问题有用虽然OP因缺乏研究工作而受到批评,但应该指出Set#merge的Ruby文档对新的Rubyists不友好。从Ruby2.3.0开始,它

ruby-on-rails - Hartl 教程中的 bundle exec rspec spec/requests/static_pages_spec.rb 不起作用

我正在按照MichaelHartl的ruby​​onrails教程测试示例应用程序(3.2.1测试驱动开发),但在键入bundleexecrspecspec/requests/static_pages_spec.rb后出现以下错误/home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common/zipper.rb:1:in`require':cannotloadsuchfile--zip/zip(LoadErr