Questions tagged «rubygems»

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

7
用捆绑器更新一颗宝石
我使用捆绑程序来管理Rails应用程序中的依赖关系,并且在git存储库中托管了一个gem,如下所示: gem 'gem-name', :git => 'path/to/my/gem.git' 要更新此gem,我执行了,bundle update但是它也更新了Gemfile中提到的所有gem。那么仅更新一个特定gem的命令是什么?
233 ruby  rubygems  bundler 


20
无法安装pg gem
我尝试使用,gem install pg但似乎不起作用。 gem install pg 给出这个错误 Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config …

15
find_spec_for_exe':找不到gem bundler(> = 0.a)(Gem :: GemNotFoundException)
我用过sudo bundle install,那可能是问题的原因? 我现在有: gem -v 2.6.14 ruby -v 红宝石2.3.5p376(2017-09-14修订版59905)[x86_64-darwin15] jekyll -v 杰基尔3.6.2 bundle -vBundler版本1.16.0.pre.3 尝试运行时bundle exec jekyll serve或刚出现以下错误jekyll serve /Users/myusername/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem bundler (>= 0.a) (Gem::GemNotFoundException) from /Users/myusername/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems.rb:299:in `activate_bin_path' from /Users/myusername/.rvm/gems/ruby-2.3.5/bin/bundle:23:in `<main>' from /Users/myusername/.rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks:15:in `eval' from /Users/myusername/.rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks:15:in `<MacBooMacBook-MacBook-MacBook-Pro-MacBook-PrMacBook-MacBooMacBMaMacBMaMaMaMaMaMaMaMaMacBMaMaMaMacBMa 另外,访问我拥有博客的文件夹时,还会cd my_path收到以下消息: VM使用您的Gemfile选择Ruby,这一切都很好-Heroku也这样做,您可以使用“ rvm rvmrc warning ignore / Library …
217 ruby  rubygems  bundle  jekyll 

20
在OS X 10.9+上安装libv8 gem
我正在尝试安装libv8 3.16.14.3,但使用最新的稳定rvm和ruby-1.9.3-p125在OSX Mavericks上出现错误。 这是运行命令“ gem install libv8”的输出: ~/src(branch:master) » gem install libv8 Fetching: libv8-3.16.14.3.gem (100%) Building native extensions. This could take a while... ERROR: Error installing therubyracer: ERROR: Failed to build gem native extension. /Users/me/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb creating Makefile Compiling v8 for x64 Using python 2.7.5 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Unable …

24
未加载库:尝试在具有MySQL2的OS X 10.6上运行“ Rails服务器”时,libmysqlclient.16.dylib错误
我已经为此苦苦挣扎了一段时间。 我已经在Snow Leopard机器上安装了Rails 3,gem,mysql。一切顺利,直到我创建了第一个项目并尝试运行 rails server 运行后,我得到: jontybrook$ rails server /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib (LoadError) Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle from /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2.rb:7 from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require' …

9
Gem :: Specification.reset期间未解决的规格:
启动Guard时,我得到以下输出: $ guard WARN: Unresolved specs during Gem::Specification.reset: lumberjack (>= 1.0.2) ffi (>= 0.5.0) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. 这是什么意思,我该如何解决? Guardfile的内容: guard 'livereload' do watch(%r{.+\.(css|js|html)$}) end guard 'sass', :input => 'css', :style => :compressed, :extension => '.min.css'
192 ruby  rubygems  guard 

14
无法在OS X“ El Capitan”上安装gems
我无法fakes3在El Capitan Beta 5上安装和运行gem。 我试过了: sudo gem install fakes3 ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/fakes3 然后我尝试用cocoapods的方式来做。它适用于可可足类,但不适用于假品3。 mkdir -p $HOME/Software/ruby export GEM_HOME=$HOME/Software/ruby gem install cocoapods [...] 1 gem installed gem install fakes3 ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 …
182 ruby  macos  rubygems 

8
``json''本机gem需要安装的构建工具
我已经ruby 1.9.2p180 (2011-02-18) [i386-mingw32]在Windows 7机器上安装了。现在,我尝试使用命令“ gem install json”安装JSON gem,并收到以下错误。 ERROR: Error installing JSON: The 'json' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from '[http://rubyinstaller.org/downloads][1]' and follow the instructions at '[http://github.com/oneclick/rubyinstaller/wiki/Development-Kit][2]' 然后我去下载了DevKit-4.5.0-20100819-1536-sfx.exe。将其提取到C:\ DevKit。然后从命令提示符处执行以下命令。 ruby dk.rb init 执行以上命令后,我验证了config.yaml的生成,并且它具有我的ruby文件夹的路径自动添加。这是config.yaml文件“-C:/ Ruby192”底部的行 ruby dk.rb …
178 ruby  json  windows-7  rubygems 

13
在OSX中卸载所有已安装的gem?
在某些情况下,我想还原并卸载所有以前的gem安装。 例如,我需要帮助一个朋友迁移他们的Rails开发机器以使用RVM。由于他们以前在整个系统中使用过gem,所以在处理多个项目时,他遇到了许多麻烦。 本质上,他是RVM转换的后代。 如何优雅地卸载他的OSX系统上的所有gem?
177 ruby  rubygems 



3
Ruby:如何编写宝石?[关闭]
关闭。此问题不符合堆栈溢出准则。它当前不接受答案。 想改善这个问题吗?更新问题,使其成为Stack Overflow 的主题。 5年前关闭。 改善这个问题 我想为Ruby编写一个程序包,并将其作为gem提供。 有哪些工具,步骤和陷阱? 有没有很好的教程,截屏等,可以帮助您学习如何做?
160 ruby  rubygems 


19
Nokogiri安装失败-缺少libxml2
我始终按照“ 安装Nokogiri ”教程中的文档来解决Nokogiri安装问题。 但是这次,即使安装了所有依赖项,也没有安装Nokogiri。我收到以下错误: libxml2 is missing. please visit <http://nokogiri.org/tutorials/installing_nokogiri.html> 我尝试通过指定libxml2和libxslt目录安装它: sudo gem install nokogiri -- --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib --with-xslt-dir=/usr/ 但它返回了相同的错误。 我关注了所有其他有关Stack Overflow的文章,但没有帮助。有没有人有办法解决吗?

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.