Questions tagged «rubygems»

RubyGems是Ruby编程语言的软件包管理工具。它允许用户下载和更新Ruby库,并提供自动依赖性解析。

12
如何将--no-ri --no-rdoc设置为gem install的默认设置?
我不使用安装在我的机器或我处理的服务器中的gem的RI或RDoc输出(我使用其他文档编制方式)。 默认情况下,我安装的每个gem都会安装RI和RDoc文档,因为我忘记了set --no-ri --no-rdoc。 有没有办法将这两个标志设置为默认值?
1040 ruby  rubygems 





16
安装json gem时出错'mkmf.rb找不到ruby的头文件'
对于上下文,它位于具有防火墙的远程服务器上。我正在通过代理设置环境。我有ruby 1.8.7。当我尝试gem install .. sudo gem install --http-proxy <host address>:<port> json 我收到以下错误: Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/json-1.8.1 for …
406 json  ruby  rubygems 


18
gem install:无法构建gem本机扩展(找不到头文件)
我正在使用Fedora 14,并且已安装并正在运行MySQL和MySQL服务器5.1.42。现在,我尝试以root用户身份执行此操作: gem install mysql 但是我得到这个错误: Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out 怎么了 …
356 mysql  ruby  rubygems 


9
如何避免OSX上的自制软件“无法加载此类文件-utils / popen”
brew在终端中运行时出现错误 : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- utils/popen (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Library/Homebrew/utils.rb:6:in `<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Library/Homebrew/global.rb:9:in `<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Library/brew.rb:16:in `<main>' 这些是我的宝石设置: - RUBYGEMS VERSION: 2.0.14 - RUBY VERSION: 2.0.0 (2014-02-24 patchlevel 451) [universal.x86_64-darwin13] …
327 ruby  macos  rubygems  homebrew 

24
如何安装cocoapods?
我引用了太多链接并尝试过,但没有成功。如果有任何想法,请与我分享。我阅读了可可豆荚文件,并尝试安装多次,但是由于启动步骤而总是失败。我发现一个错误,导致我无法首先安装gems。谁能一步一步给我?如何安装或演示。 这是我尝试的一个链接。 屏幕截图显示了我收到的此控制台错误:
306 ios  swift  xcode  rubygems  cocoapods 


28
软件包安装失败,并显示SSL证书验证错误
当我bundle install在Centos 5.5上运行Rails 3项目时,它失败并出现错误: Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://bb-m.rubygems.org/gems/multi_json-1.3.2.gem) An error occured while installing multi_json (1.3.2), and Bundler cannot continue. Make sure that `gem install multi_json -v '1.3.2'` succeeds before bundling. 当我尝试手动安装gem时(通过gem install multi_json -v '1.3.2'),它可以工作。其他几个宝石也会发生相同的问题。我使用RVM(1.12.3),ruby 1.9.2,bundler 1.1.3。 如何解决?

11
未初始化的常数ActiveSupport :: Dependencies :: Mutex(NameError)
当我想创建Ruby on Rails项目时,会收到以下消息。 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:57 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator.rb:31 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/bin/rails:15 from /usr/bin/rails:19:in `load' from /usr/bin/rails:19 出了什么问题?我该如何解决?

25
rmagick gem install“找不到Magick-config”
尝试安装rmagick gem时出现以下错误。我在使用RVM,Ruby 1.9.2-head和Rails 3.05的Snowleopard 10.6上。对类似问题的回答建议安装ImageMagick,我成功完成了该操作。其他建议安装“ libmagick9-dev库”,但是,我不知道如何执行此操作。 我是一名新开发人员,非常感谢您对现有说明或资源的任何帮助或指示。谢谢! jjdevenuta(opal)$ gem install rmagick Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /Users/jjdevenuta/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... no …

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.