Tag: gem

我如何找出gem包在特定版本中锁定gem的原因?

我正在尝试在我的gem文件中指定thrift gem的一个版本。 gem ‘thrift’, “~> 0.6.0” 当我尝试运行bundle install ,我收到此错误: You have requested: thrift ~> 0.6.0 The bundle currently has thrift locked at 0.5.0. Try running `bundle update thrift` 如何找出导致它被锁定在早期版本的原因? 它是否符合我在gem文件中列出的另一个gem的要求? 或者它只是由安装版本为0.5.0引起的,并且在gem文件中指定版本不会更新已安装的gem?

这是什么意思BUNDLE_DISABLE_SHARED_GEMS:’1’?

我在.bundle/config找到了BUNDLE_DISABLE_SHARED_GEMS: ‘1’ 。 这是什么意思?

OSX Yosemite和Xcode 6安装后的Ruby gem安装错误

我在安装Yosemite之前尝试安装一个像我一样的gem,但是现在我收到一个错误: /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:159:in“synchronize”:错误:无法构建gem原生扩展。 (gem::内线:: BuildError) 错误:无法构建gem原生扩展。 僵局; 递归锁定 这是我写的命令: sudo gem install mysql2 这是它出现在终端中的消息: Gem文件将保留在/Library/Ruby/Gems/2.0.0/gems/autotest-fsevent-0.2.9中进行检查。 结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/autotest-fsevent-0.2.9/gem_make.out Gem文件将保留在/Library/Ruby/Gems/2.0.0/gems/autotest-fsevent-0.2.9中进行检查。 结果从/Library/Ruby/Site/2.0.0/rubygems记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/autotest-fsevent-0.2.9/gem_make.out /ext/builder.rb:159:in build_extension’ from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:198:in block in build_extensions’from /Library/Ruby/Site/2.0.0 /rubygems/ext/builder.rb:195:in/Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in build_extensions’from /Library/Ruby/Site/2.0.0 block in build_extensions’ from /Library/Ruby/Site/2.0.0/rubygems/user_interaction.rb:45:in use_ui’中的/rubygems/specification.rb:1436:in block in build_extensions’ from /Library/Ruby/Site/2.0.0/rubygems/user_interaction.rb:45:in build_extensions’ from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:60:in build_extensions’中的/specification.rb:1434:in build_extensions’ from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:60:in :56:in contains_requirable_file?’ from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:925:in contains_requirable_file?’ from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:925:in在find_inactive_by_path’中的阻止来自/Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in each’ from […]

如何安全地修复webrobots-0.0.10.gemspec中的“规范中的无效日期格式”

对于每个gem执行,我收到以下错误: Invalid gemspec in […rvm/gems/ruby-1.9.2-p136/specifications/webrobots-0.0.10.gemspec]: invalid date format in specification: “2011-07-01 00:00:00.000000000Z” 我不是webrobots维护者,我无法卸载该gem。 有什么安全措施可以在生产服务器上解决此问题吗?

在Mac OS x Lion上安装mysql2 gem

前几天我更新到了Mac OSX Lion。 它打破了我的rails安装,因为我不得不重新编译mysql。 虽然我有工作重新安装mysql2gem已成为问题。 我当时正在跑豹,所以我要从32位到64位。 ~/code/rails/london (master)$ gem install mysql2 — –with-mysql-dir=/usr/local/mysql Building native extensions. This could take a while… ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/stewartmatheson/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb –with-mysql-dir=/usr/local/mysql checking for rb_thread_blocking_region()… *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries […]

找出Gemfile中哪些gems需要本机c扩展?

我最近刚开始将注意力转移到在TorqueBox部署Ruby应用程序,当然这些应用程序是在Jruby上面构建的。 到目前为止,我基本上已经执行了一个bundle install ,然后在前往jrubydom的途中处理每个gem,但是由于需要重新实现其中的大部分,我已经花了几个gem花了我相当长的时间来解决。 有没有办法调用bundler或rubygems来运行所有gems及其deps来测试它们是否需要本机c扩展然后返回这样的列表? 确定解决一些较小的项目肯定会很好,甚至知道在将项目转移到jruby方面是否值得解决一个项目。

Bundle install尝试使用缓存文件

当我尝试进行捆绑安装时,我的gem_path和gem_home指向/ usr / local / rvm / gems /,我没有写入权限,但由于权限无效而失败。 因为这个我已经改变了两个路径到我有写访问权的本地目录。 这样做,我做一个捆绑安装,我得到: bruno@test6:~$ bundle install Fetching gem metadata from https://rubygems.org/……… Fetching gem metadata from https://rubygems.org/.. Bundler::GemspecError: Could not read gem at /afs/varda.io/user/b/br/bruno/test6/cache/rake-10.1.0.gem. It may be corrupted. An error occurred while installing rake (10.1.0), and Bundler cannot continue. Make sure that `gem install rake -v ‘10.1.0’` succeeds […]

错误:执行gem时…(Gem :: FilePermissionError)

我检查了所有其他类似的答案,没有一个与我的完全一样,这些解决方案中的任何一个都不适合我。 gem environment和sudo gem environment给出了相同的结果: RubyGems Environment: – RUBYGEMS VERSION: 1.5.3 – RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux] – INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8 – RUBY EXECUTABLE: /usr/local/bin/ruby – EXECUTABLE DIRECTORY: /usr/local/bin – RUBYGEMS PLATFORMS: – ruby – x86_64-linux – GEM PATHS: – /usr/local/lib/ruby/gems/1.8 – /home/ava/.gem/ruby/1.8 – GEM CONFIGURATION: – :update_sources => true – :verbose => […]

“PHP Composer”与“Ruby Gems and Bundler”相比

(首先,这个问题不是“哪个更好”的问题。我只是想知道它们是如何相似的,并且在function方面有所不同。) 我是php开发人员,目前正在学习ruby 。 在这些日子里,鼓励许多php开发人员使用Composer进行依赖管理。 在提问之前,我想首先validation我的知识。 根据我的理解, Composer是php库(或包)的依赖管理工具。 Composer按项目安装php库(所谓的本地)。 我的意思是为project1安装的php库不能重新用于project2而不再为project2安装。 我注意到Ruby也有非常好的依赖管理工具“ RubyGems ”。 据我所知, “ RubyGems ”是“ RubyGems ”的包管理器。 “ Gem ”是一个以标准格式打包的Ruby程序或库,用于共享。 (Rails也是一个gem。) Gem可以通过命令安装,就像gem install sinatra 。 但是,也有所谓的“ Bundler ”,它也是为应用程序捆绑gem的gem。 当命令bundle install运行时(在特定的ruby项目目录下),将为此ruby项目安装Gemfile中列出的所有gem。 所以,我的问题就在这里。 Composer类似于RubyGems还是Bundler ? 运行gem install sinatra ,它是否安装在系统级别? 运行bundle install ,是否在本地(仅在此项目上)或系统级别安装Gems? 如果我需要两个版本的一个gem (例如sinatra )用于不同的项目,我应该如何处理? (对不起,我的问题很长。如果我的理解有问题,请再次抱歉,请指出正确的。)

Rails Installtion错误:’primefaces’本机gem需要安装构建工具

我在我的窗户上安装Rails 3。 我安装了最新的ruby 2.0.0,我更新了gem。 但是当我使用gem install rails安装rails时,成功的消息已经出现,但最后我发现了 ERROR: Error installing rails: The ‘atomic’ native gem requires installed build tools Please update your PATH to include build tools or download the DevKit from ‘http://rubyinstaller.org/downloads’ and follow the instructions at ‘http://github.com/oneclick/rubyinstaller/wiki/Development-Kit’ 请帮助我……