Tag: rubygems

冻结Railsgem版本

我试图冻结我的Rails gem版本,因为日复一日,某些或其他gem版本会更新,有时我需要更新代码。 我试过rake rails:freeze:gems但这给了我错误: rake aborted! Don’t know how to build task ‘rails:freeze:gems’

安装Mysql 2 gem失败

我正在尝试安装mysql2(版本0.4.5 ),我正在使用Rails 5.0.2 ,Ruby 2.3.1 我已经使用自制软件(版本8.0.11)安装了mysql服务器并启动了mysql: brew install mysql brew services start mysql Gemfile.rb gem ‘mysql2’ 当我尝试安装gem mysql2时,我收到以下错误 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2 creating Makefile current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2 make “DESTDIR=” clean current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2 make “DESTDIR=” compiling client.c In file included from client.c:1: In file included from ./mysql2_ext.h:41: ./result.h:24:3: […]

同时使用2个版本的gem

我可以在一个应用程序中使用两个版本的gem吗? 我正在尝试使用两个rails插件一起工作: Pengwynn的LinkedIn https://github.com/pengwynn/linkedin对于LinkedIn API调用,依赖于oauth(〜> 0.3.5) 用户通过多个知名网站登录的OmniAuth依赖于oauth 0.4.0 当我尝试在rails中的东西时,我收到此错误消息: $ rails server c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/resolver.rb:129:in `resolve’: Bundler could not find compatible versions for gem “oauth”: (Bundler::VersionConflict) In snapshot (Gemfile.lock): oauth (0.4.4) In Gemfile: linkedin depends on oauth (~> 0.3.5) Running `bundle update` will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may […]

安装unf_ext 0.0.7.2无法正常工作

因此,当我尝试运行bundle install –without production它会告诉我我收到错误并且我需要Make sure that gem install unf_ext -v 0.0.7.2 succeeds before bundling 。 我在安装其他gem之前没有遇到过这个错误,但只有当我尝试安装gem stripe (用于接收用户付款等)时才会出现此错误。 有人可以解释可能导致这类问题的原因。 非常感谢所有帮助。 谢谢,-Aaron 编辑 我为解决我的问题所做的是将我的所有gem更新为他们当前和最新版本。 然后,当我运行bundle install –without production后,一切似乎安装完美后。

如何修复Rails 3(bundler)中的这个gem依赖问题?

由于某种原因,每次我尝试运行bundle install时,我的项目都搞砸了,现在它的抛出错误。 通过重新排序我的Gemfile的gem,我设法解决了一些错误,但现在我得到了这个: Bundler could not find compatible versions for gem “faraday”: In Gemfile: omniauth depends on faraday (~> 0.7.3) twitter depends on faraday (0.6.1) 我认为使用bundler应该删除依赖wtf’s ? 我假设这个消息意味着两个gem需要2个不同版本的faraday ..? 我怎么能解决这个问题呢? 为什么不安装这两个版本,每个gem加载它想要的版本? 我喜欢这方面的帮助! 谢谢 Gemfile.lock: https ://gist.github.com/1061722 的Gemfile: # Edit this Gemfile to bundle your application’s dependencies. source ‘http://rubygems.org’ gem ‘rails’, ‘3.0.9’ #, :git => ‘git://github.com/rails/rails.git’ […]

Rails的后台作业管理器3

有谁知道一个与Rails 3一起使用的后台作业管理器? 我听说过Starling和Workling,但我没有看到Rails 3的分叉。

Gem / Bundler加载错误:无法激活…已激活

我运行了捆绑更新来更新我的gem。 现在,当我尝试启动本地开发服务器时,我得到了这个。 有谁知道如何解决? hostname:myapp username$ rails s /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:238:in `activate’: can’t activate i18n (~> 0.4.1, runtime) for [“mail-2.2.10”, “actionmailer-3.0.3”, “rails-3.0.3”], already activated i18n-0.5.0 for [“activemodel-3.0.3”, “actionpack-3.0.3”, “rails-3.0.3”] (Gem::LoadError) from /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:254:in `block in activate’ from /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:253:in `each’ from /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:253:in `activate’ from /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:254:in `block in activate’ from /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:253:in `each’ from /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:253:in `activate’ from /Users/username/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:254:in `block in activate’ from […]

删除Gems错误

我有2个版本的ruby使用RVM,我试图删除我的gemversion 1.8.7-p302 首先我试过这个,但我得到了错误 ➜ ~ gem list | cut -d” ” -f1 | xargs gem uninstall -aIx Successfully uninstalled actionmailer-2.3.5 Successfully uninstalled actionmailer-2.3.18 Successfully uninstalled actionpack-2.3.5 Successfully uninstalled actionpack-2.3.18 Successfully uninstalled activerecord-2.3.5 Successfully uninstalled activerecord-2.3.18 Successfully uninstalled activeresource-2.3.5 Successfully uninstalled activeresource-2.3.18 Successfully uninstalled activesupport-2.3.5 Successfully uninstalled activesupport-2.3.18 Removing bundle Successfully uninstalled bundler-1.3.5 ERROR: While executing […]

ruby on rails安装JSON ubuntu错误

嘿,我是rails(以及linux)的新手,我一直收到这个错误: Installing json (1.7.5) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: cannot load such file — mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ from extconf.rb:1:in `’ Gem files will remain installed in /home/jack/.bundler/tmp/10426/gems/json-1.7.5 for inspection. Results logged to /home/jack/.bundler/tmp/10426/gems/json-1.7.5/ext/json/ext/generator/gem_make.out An error occurred while installing json (1.7.5), and Bundler cannot […]

LoadError:无法在Windows 2008 x64服​​务器上加载此类文件–bcrypt_ext

我将我的环境从Ruby 2.0.0升级到2.2.3。 我还升级(覆盖)DevKit,并重新运行ruby dk.rb install。 我删除了Gemfile.lock并运行bundle install以一个全新的环境开始。 一切看起来都不错,但我收到错误: E:\Projects\development\Stairs>rake db:migrate rake aborted! LoadError: cannot load such file — bcrypt_ext E:/Projects/development/Stairs/config/application.rb:7:in `’ E:/Projects/development/Stairs/Rakefile:4:in `’ LoadError: cannot load such file — 2.2/bcrypt_ext E:/Projects/development/Stairs/config/application.rb:7:in `’ E:/Projects/development/Stairs/Rakefile:4:in `’ (See full trace by running task with –trace) 我第一次遇到与Nokogiri相同的问题,我使用这个解决方案解决了: Nokogiri使用Juloi Elixir的解决方案加载错误并从本地副本安装Nokogiri。 但我不想做这个foreachgem! 看起来ruby正在使用./或./2.2路径搜索gem,而gem则存储在./2.2.0路径中。 这是可配置的吗? 我该如何解决这个问题? Note: Gemfile contains gem ‘bcrypt’, ‘~> […]