Tag: rubygems

无法在Mac OS上安装任何ruby gems – SSL_connect错误

我的环境是Mac OS 10.10.5,ruby版本2.2.4(或2.2.2或2.2.0)gem(升级后)是2.6.7,rvm版本1.27.0。 即使在最近几天,这也有几个重复,但这比我在评论中提供的信息更多。 在任何版本的ruby上安装任何gem时,我得到以下内容: $ gem install bundler ERROR: Could not find a valid gem ‘bundler’ (>= 0), here is why: Unable to download data from https://rubygems.org/ – SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) 有很多关于此的信息,特别是对于Windows上的问题。 有关建议的解决方案,请参见http://guides.rubygems.org/ssl-certificate-update/ 。 我遵循这个但我继续得到同样的错误。 问题似乎是将文件GlobalSignRootCA.pem放在适当的地方,这一点并不完全清楚。 上面的链接解释了如何找到合适的ssl_certs目录,其中有2个在我的系统中,但都没有工作。 我忘了在哪里学到了以下内容: $ ruby -ropenssl -e ‘puts OpenSSL::X509::DEFAULT_CERT_DIR’ /etc/openssl/certs […]

rake db:migrate因rake版本差异而被中止

我收到了错误 rake db:migrate –trace rake aborted! You have already activated rake 10.1.1, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this. /Users/iang/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup’ /Users/iang/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup’ /Users/iang/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup’ /Users/iang/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/setup.rb:7:in `’ /Users/iang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in `require’ /Users/iang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in `rescue in require’ /Users/iang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:122:in `require’ /Users/iang/code/Projects/work/startco/config/boot.rb:4:in `’ /Users/iang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require’ /Users/iang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require’ /Users/iang/code/Projects/work/startco/config/application.rb:1:in `’ /Users/iang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require’ /Users/iang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require’ /Users/iang/code/Projects/work/startco/Rakefile:4:in […]

默认情况下,为rubygems 1.8.x禁用rdoc和ri生成

这个问题有很多答案可以在旧版本的rubygems下工作,但Rubygems 1.8.x的推荐程序是什么? 我有一个/etc/gemrc文件,如下所示: gem: –no-rdoc –no-ri 在任何gem install期间似乎都会忽略这些选项。 更新: 在做了一些挖掘之后,似乎问题与rvm有关, rvm不仅分割了各种版本的ruby,而且还分配了它们的相关配置文件。 要检查配置文件的位置,请使用irb : require ‘rubygems’ Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE # => “/opt/local/rvm/rubies/ruby-1.9.2-p180/etc/gemrc”

如何跟踪和检查捆绑的Ruby gem中的依赖项

Bundler将自动为指定的gem安装任何依赖项,但是它不会输出哪些依赖项映射到标准输出中的哪些gem。 当其中一个依赖项未能通过安装时,该信息很有用。 有没有办法将Bundler设置得更详细,并在安装时通知有关依赖项? 我使用的是Bundler 1.0.2

无法找到捆绑exec的rake

当我尝试执行’ bundle exec rake anything ‘时,我收到错误: Could not find rake-10.1.0 in any of the sources. Run `bundle install` to install missing gems. 但是当我执行简单的“耙任何东西”时 ,耙子正在工作。 当然,我试过以任何方式设置gem,我知道: gem install rake -v = 10.1.0 在Gemfile中写了“gem’rake ‘,’10 .1.0 ‘ ”,然后执行bundle install 我为所有rvm安装了gem: rvm都做了gem install rake -v 10.1.0 这种情况真的很沮丧,因为简单的rake工作,但是捆绑exec不想要。 我需要使用bundle exec执行rake 真的需要你的帮助!

什么是Rails插件或Ruby gem来自动修复英语语法?

Facebook刚刚重新启动了评论,具有自动语法修复function。 语法filter有什么作用? 添加标点符号(例如句子末尾的句点) 修剪额外的空白自动案例单词(例如,将句子的第一个单词大写) 扩展俚语(例如,PLZ变为请) 在标点符号后添加空格(例如Hi,Cat会变成Hi,Cat) 修复常见的语法错误(例如将’不要’转换为’不要’) 什么是等效的插件或gem?

安装“nio4r”时使用rails 5.0.0:无法构建gem原生扩展

这是日志: http : //pastebin.com/CAgur9xd Installing nio4r 1.2.1 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby2.2.0/bin/ruby.exe -r ./siteconf20160720-8272-c88sgk.rb extconf.rb –with-cflags=-std=c99 checking for unistd.h… *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need […]

无法在任何来源中找到rake-10.0.4(Bundler :: GemNotFound)

我最近一直试图在服务器上运行我的ruby应用程序,并且我一直遇到这个错误: Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound) 我正在运行Rails 3.2.12和Ruby 1.9.3p392。 到目前为止,我在访问服务器时没有遇到任何问题,这是我第一次遇到此错误。 我一直在寻找答案,但由于我对ruby和rails相对较新,我找不到一个简单易懂的答案。 Gemfile : source ‘http://rubygems.org’ # STANDARD SET OF GEMS, SEE BOTTOM OF FILE FOR A LIST OF OTHER USEFUL GEMS gem ‘rails’, ‘3.2.12’ gem ‘haml-rails’ gem ‘retina_tag’ gem ‘mysql2’ gem ‘will_paginate’ gem ‘bootstrap-will_paginate’ gem ‘contact_form’ gem ‘draper’ gem ‘pony’ […]

即使安装了Ruby gem也不会加载

我知道在SO上有类似的问题,但没有一个能解决我的问题……它的要点是我无法在Ubuntu 10.04上安装干净的Ruby 1.9.1上加载gem: :~/$ irb irb(main):001:0> require ‘rubygems’ => false irb(main):002:0> require ‘cassandra’ LoadError: no such file to load — cassandra from (irb):1:in ‘require’ from (irb):1 from /usr/local/bin/irb:12:in ” irb(main):003:0> Gem.path => [“/opt/ruby1.9/lib/ruby1.9/gems/1.9.1”] irb(main):004:0> exit :~/$ ls /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/ cassandra-0.8.2 eventmachine-0.12.10 json-1.4.6 rake-0.8.7 simple_uuid-0.1.1 thrift-0.2.0.4 thrift-0.4.0 thrift_client-0.5.0 :~/$ gem list –local *** LOCAL GEMS *** cassandra […]

无法激活susy-2.1.1,因为sass-3.2.17与sass冲突(〜> 3.3.0)

我已经安装了最新版本的指南针,sass和susy。 但我仍然收到此错误: Unable to activate susy-2.1.1, because sass-3.2.17 conflicts with sass (~> 3.3.0) 谁知道这个Ruby的工作原理是什么? 这是我安装的gem列表: *** LOCAL GEMS *** CFPropertyList (2.2.0) chunky_png (1.3.0) compass (0.12.4) compass-core (1.0.0.alpha.19) compass-import-once (1.0.4) compass-rails (1.1.3) fssm (0.2.10) libxml-ruby (2.6.0) multi_json (1.9.2) nokogiri (1.5.6) rb-fsevent (0.9.4) rubygems-update (2.2.2) sass (3.3.4, 3.3.3, 3.2.17) sqlite3 (1.3.7) susy (2.1.1)