Tag: bundler

Bundler使用旧版本

我使用Bundler作为我的Rails应用程序。 当我列出已安装的bundler gems时,它列出1.4.0.pre.1和1.3.15并运行bundler -v产生1.4.0.pre.1 (这就是我想要的)。 但是,当我尝试运行我的应用程序时,它说当前的bundler版本是1.0.15 。 此版本未作为gem安装,我无法弄清楚如何删除它( gem uninstall bundler -v 1.0.15不能正常工作,因为此版本未作为gem安装)。 我尝试过更新和安装新版本,但没有任何工作。 请帮忙,我已经被困了几个小时。 谢谢。

使用旧的rubygems版本捆绑安装

我有一个似乎是在1个月大的问题中看到的完全相同的问题 ,没有人触及过。 我使用自制软件安装了rbenv,使用rbenv install 2.3.1安装了ruby 2.3.1,使用gem install jekyll和gem install bundler gem install jekyll和gem install bundler ,然后在jekyll项目中输入了bundle install 。 我收到错误Rubygems 2.0.14.1 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation. Rubygems 2.0.14.1 is not threadsafe, so your gems will be installed […]

在能够使用Capistrano进行部署之前,是否需要在我的服务器上手动安装Bundler?

标题基本概括了所有内容。 我刚刚使用Ruby 1.9.2设置了我的Web服务器。 这是一个干净的安装 – 尚未安装任何gem。 另外,我刚刚为我的Rails应用程序配置了Capistrano。 当我运行cap deploy ,它失败并显示以下错误消息: *** [err :: bogusip.com] bash: bundle: command not found 鉴于我所做的就是将Ruby 1.9.2安装到我的服务器上,此时Bundler不存在。 Capistrano是应该为我安装Bundler gem还是我自己应该这样做?

Grunt / Bundler不会使用指定的sass版本

我们有一个Grunt和Bundler设置的项目。 所有这些安装没有问题。 生成Gemfile.lock,下拉正确的gem,以及使用npm创建的grunt文件。 我们开始监视项目并且它在sass编译时爆炸,因为它使用了错误版本的sass而不是gemfile中指定的版本。 顺便说一句,这是在窗户上…… 的Gemfile source ‘https://rubygems.org’ gem ‘sass’, ‘~> 3.2’ gem ‘compass’, ‘~> 0.12’ gem ‘susy’, ‘~> 1.0’ Gemfile.lock的 GEM remote: https://rubygems.org/ specs: chunky_png (1.3.1) compass (0.12.6) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.2.19) fssm (0.2.10) sass (3.2.19) susy (1.0.9) compass (>= 0.12.2) sass (>= 3.2.0) PLATFORMS x86-mingw32 DEPENDENCIES compass (~> […]

Bundler如何在Gemfile中单独在一个文件中单独要求gems?

我在rspec和mocha之间存在冲突(rspec不使用mocha,但其他最小的测试是)。 如果我把mocha放在我的gemfile中(即使是require:false),它也会被activesupport / test_case.rb加载:15 silence_warnings { require ‘mocha/setup’ } 然后导致rspec到barf。 所以,我想在我的系统gems的test_setup文件中要求它,但我无法弄清楚如何在bundler之外加载gem。 关于如何让这些gem玩得很好的其他想法值得欢迎。

如何使用bundler创建相互依赖的gem,并使用存储库作为源?

如何创建相互依赖的gem,仍然使用Bundler? 现在,如果library-a Gemfile如下所示: gem ‘library-b’ gem ‘library-c’ 并且library-b的Gemfile读取如下: gem ‘library-a’ gem ‘library-c’ 并且library-c的Gemfile读取: gem ‘library-a’, github: ‘library-root/library-a’, branch: ‘master’ gem ‘library-b’, github: ‘library-root/library-b’, branch: ‘master’ 当您尝试为library-c运行bundle update和/或bundle install ,这是输出: Your Gemfile requires gems that depend depend on each other, creating an infinite loop. Please remove either gem ‘library-a’ or gem ‘library-b’ and try again. 对于library-a或library-b将发生相同消息的变体。 […]

在我的mac上更新gem – 安装了两个版本的bundler

我在RVM之前和之后安装了我的本地机器上的大量gem,所以我决定将它们全部擦除并重新安装。 一切似乎都没问题,除了捆绑: gem list ….. bundler (1.1.3, 1.0.22) 我不知道为什么1.0.22仍然存在,我无法弄清楚如何摆脱它! $ gem cleanup Cleaning up installed gems… Attempting to uninstall bundler-1.0.22 Unable to uninstall bundler-1.0.22: Gem::InstallError: gem “bundler” is not installed Clean Up Complete $ gem uninstall bundler-1.0.22 INFO: gem “bundler-1.0.22” is not installed 更新安德鲁要求的路径信息 /Users/brandon/.rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/

通过要求gem:path或:git来实现LoadError

我在这里遇到了一个非常奇怪的问题。 我在github上分叉了一个gem进行一些修改,在我的本地机器上克隆了我的repo,进行了更改并更改了另一个项目的Gemfile以从我的本地存储库中获取gem以进行测试。 不幸的是,我在ruby脚本中需要gem时遇到LoadError。 rvm current => ruby-1.9.3-p448 ruby –version => ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux] bundle –version => Bundler version 1.3.5 我的Gemfile的内容: source ‘http://rubygems.org gem ‘steps’, :path => “/home/benny/workspace/steps” 捆绑输出: $ bundle –no-cache Resolving dependencies… Using colored (1.2) Using highline (1.6.19) Using steps (1.0.2) from source at /home/benny/workspaces/steps Using bundler (1.3.5) Your bundle is […]

以编程方式检查gem中是否包含gem?

在运行时,在完成捆绑器设置并应用组之后,以编程方式检查给定gem_name是否在捆绑中的最佳方法是什么? 通过阅读源代码,我发现了Bundler.definition ,例如 gem_name = ‘banana’ Bundler.definition.dependencies.map(&:name).include?(gem_name) 但无法找到文档1 ,我不知道这是否是推荐用法。 更新:看起来Bundler::Definition#dependencies返回所有依赖项,而不管组。 作为替代方案,我发现了Bundler::Runtime#dependencies_for ,它将组作为参数。 Bundler.load.dependencies_for(:default, Rails.env).map(&:name).include?(gem_name) 但是,在每个呼叫站点复制“组列表”似乎是个坏主意。 理想情况下,我想在Bundler中使用一种方法,不需要我指定当前组。 1 bundler网站和手册页专注于命令行使用。 我还没有找到有关gem的公共ruby API的任何文档。 源代码中的注释很有帮助,但主要关注数据类型等。

bcrypt-ruby不会与bundler一起安装,但可以与gem install一起使用

我刚刚开始遇到捆绑包问题 – 在进行捆绑安装或sudo捆绑安装时,bcrypt-ruby将无法安装,并退出时出现以下错误: Installing bcrypt-ruby (2.1.4) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb Gem files will remain installed in /home/deploy/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-2.1.4 for inspection. Results logged to /home/deploy/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-2.1.4/ext/mri/gem_make.out An error occured while installing bcrypt-ruby (2.1.4), and Bundler cannot continue. Make sure that `gem install bcrypt-ruby -v ‘2.1.4’` succeeds before bundling. 但是, […]