如何解决 Rails 3(捆绑程序)中的 gem 依赖问题?

2024-03-10

由于某种原因,我的项目搞砸了,现在每次我尝试运行时都会抛出错误bundle install。我通过重新排列我的宝石中的宝石来修复一些错误Gemfile,但现在我得到了这个:

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)

我认为使用捆绑器应该消除依赖性wtf's?我假设这条消息意味着两个宝石想要 2 个不同版本faraday..?

我该如何解决这个问题呢?为什么它不只安装两个版本,然后每个 gem 加载它想要的版本?

我希望得到一些帮助!

Thanks

Gemfile.lock:https://gist.github.com/1061722 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'
gem "haml-rails"
gem "jquery-rails"

# Gem to abstract away the dplication common in standard restful controllers
gem 'inherited_resources'

# Allows us to keep an order of a user's items in their collection
gem "acts_as_list"

# Used to simplify user registrations and logins
# Pined to ref, as there is problem on devise HEAD
gem "devise", :git => "git://github.com/plataformatec/devise.git", :ref => '4964f53a42a3d434ee6d731d6f999d8dae13dada'

# Might not be used
gem "ajaxful_rating"



# Facilitates Edit-in-place functionality for certain data fields
gem "best_in_place", :git => 'git://github.com/moabite/best_in_place.git'


# Gem for uploading images.  More flexible than "paperclip"
gem "carrierwave", :git => 'git://github.com/jnicklas/carrierwave.git'
gem "fog"

# Apparently needed to make the uploadify multifile uploader work 
gem "flash_cookie_session"

# Used to that we can resize images uploaded through carrierwave, using
# ImageMagick
gem "rmagick"

# Easily create database models for site simulation
gem "factory_girl_rails"

# Useful for fake data generation
gem "faker"
gem "randexp"
gem "random_data"
gem 'forgery'
gem "lorempixum", :require => 'lorempixum'

gem "hashie"
# gem 'aws-s3', :require => 'aws/s3'
# gem 'bcrypt-ruby', :require => 'bcrypt'

# Provides a shorter syntax for building forms
gem 'formtastic'

# Sends notifications of errors on Production app
gem "hoptoad_notifier"

# Social Media Gems FB Connect, FB, and Twitter
gem "omniauth", :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
gem "fb_graph"
gem "twitter"

gem 'rake', '0.8.7'

gem "jammit"

gem "rest-client"
gem 'rails-erd', :git => "git://github.com/voormedia/rails-erd.git"
gem "nokogiri"

group :development, :test do
  gem "guard"
  gem "guard-ego"
  gem "guard-bundler"
  gem "guard-jammit"
  gem "guard-rails"
  gem "guard-rspec"
  gem "guard-shell"
  gem "guard-compass"
  gem "guard-livereload"
  gem 'rb-fsevent', :require => false 
  gem "rb-inotify", :require => false
  gem "libnotify", :require => false

  # Needed to run html2haml to convert html to haml
  gem "hpricot"

  gem "taps"

  gem "heroku"

  #gem "heroku-rails", :git => "git://github.com/railsjedi/heroku-rails.git"
  gem "heroku-rails", :git => "git://github.com/sid137/heroku-rails.git"

  gem "sqlite3-ruby", :require => 'sqlite3'
  gem "ruby-debug19", :require => 'ruby-debug'

  # nice table displays in Rails console
  gem "hirb"

  gem "facebook_test_users", :git => "git://github.com/sid137/facebook_test_users.git"

  # Allows us to push the local development database up to Heroku, and pull the
  # heroku db down locally
  gem "yaml_db"

  gem "escape_utils"

  # Sass and Blueprint based css framework for dev machine
  # use "compass compile . " to compile css before deployment
  gem "compass", ">=0.11.1"

  # Print a header in app/model/*.rb files, listing the db columns present for
  # each model


  gem "selenium-webdriver"
  gem "rack-test"
  gem "capybara", :require => 'capybara/rspec'
  gem "launchy"
  gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git'

  gem "rspec-core", "2.6.4"
  gem "rspec-rails"# , '2.6.0' #, '2.5.0'
  #gem 'shoulda-matchers', :git => 'git://github.com/thoughtbot/shoulda-matchers.git'
  #gem 'shoulda-matchers', :git => 'git://github.com/sid137/shoulda-matchers.git'
  gem "ZenTest"
  gem "autotest-rails"
end

您使用的 Omniauth 的具体版本取决于 Faraday ~> 0.7.3,而最新发布的 Twitter gem 版本需要 0.6。

您可以使用存储库中最新版本的 Twitter gem 来修复此问题。

gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何解决 Rails 3(捆绑程序)中的 gem 依赖问题? 的相关文章

  • Rails:基于关联值的ActiveRecord查询

    我有 2 个型号 Report and Server具有belongs to 和has many 关系 我使用创建了一个访问器方法delegate这允许Report来查找其关联的Server company id 现在 我想运行一个查询Re
  • 使用 gchart (googlecharts) gem 时出错 - NameError: 未初始化的常量 Gchart

    http googlecharts rubyforge org http googlecharts rubyforge org 我安装了它 sudo gem 安装 googlecharts 它安装得很好 但每当我尝试使用它时 我都会得到 N
  • 验证错误消息中不包含字段名称

    如果我有以下验证 validates inclusion of dob in gt Date new 1900 Time now years ago 18 to date message gt You must be 18 or older
  • Heroku上传-预编译资产失败

    我需要帮助 当尝试将我的应用程序上传到heroku时 我收到此错误 有人知道为什么吗 有几个是错的 谢谢 Using rake 10 1 0 Using tlsmail 0 0 1 Using uglifier 2 1 2 Your bun
  • Rails:如何在setter方法中使父属性可用

    Context 我有一个company模型有很多projects 有很多tasks The company也有很多employees 这又具有许多tasks Schema Problem 我正在构建一个表单来创建一个项目 用户可以在其中添加
  • ruby - 数组元素之间的排列

    我正在使用 ruby 在 Google Sketchup 中编写一个插件 在尝试排列数组中存在的两个数组时遇到了一个真正的问题 所有这些都取决于用户组合 我有一个数组数组 例如 1 lol so 当我们有这样的组合 1 2 3 没关系 它应
  • 文件上传字段导致 ActionController::InvalidAuthenticityToken 异常

    使用 Rails 4 并尝试使用 simple form 和回形针将文件字段添加到现有表单 这是表格的关键部分 一切正常 除非我实际提交带有上传文件的表单 然后 我得到这个 ActionController InvalidAuthentic
  • Rails 渲染不必要的信息

    我一直在使用 RoR 和 Bootstrap 我试图将我的代码渲染成我在网上找到的片段 基本上我的索引中有这个 div class col md 6 div class well well sm div class row p p p p
  • 如果 gem 安装不支持,本机扩展会回退到纯 Ruby

    我正在开发一个 gem 目前是纯 Ruby 但我也一直在为其中一个功能开发更快的 C 变体 该功能在纯 Ruby 中可用 但有时很慢 这种缓慢只会影响一些潜在用户 取决于他们需要哪些功能 以及他们如何使用这些功能 因此 如果 gem 无法在
  • Rails 3.1 与 Asset Pipeline,link_to :确认消息显示两次?

    好的 所以我已经看到了这个问题 https stackoverflow com questions 4475449 link to confirm displays popup twice关于这个问题是由 jQuery 或 Prototyp
  • Rails:如何将替代 Accept: content-types 视为 JSON?

    到目前为止我已经找到了两种方法request format json 在 Rails 中为 true 即传入请求被视为 JSON 一种是如果您请求资源并以 json另一个是如果您提供标头Accept application json在你的要
  • Rails 是否支持侦听 UDP 套接字的简洁方式?

    在 Rails 中 集成更新模型某些元素的 UDP 侦听过程的最佳方式是什么 特别是向其中一个表添加行 简单的答案似乎是在同一进程中使用 UDP 套接字对象启动一个线程 但不清楚我应该在哪里执行适合 Rails 方式的操作 有没有一种巧妙的
  • debugger-ruby_core_source gem 没有提供 ruby​​-2.0.0-p451 的源代码

    我在其他 SO 问题中看到了非常类似的问题 例如debugger ruby core source gem 没有提供 ruby 1 9 2 p321 的源代码 https stackoverflow com questions 204618
  • 在 sidekiq 上配置 redis 身份验证

    我想我错过了一些东西 因为我在文档中找不到如何编写 redis 实例的用户名和密码以与 sidekiq 一起使用 有没有办法做到这一点 或者是通过 ENV 变量 Sidekiq 将无法识别的 Redis 选项直接传递给 Redis 驱动程序
  • 如何在 Rails Active Admin 中添加 Colorpicker?

    我想实现这个http www eyecon ro colorpicker about http www eyecon ro colorpicker about或活动管理表单之一中的任何其他颜色选择器 任何帮助表示赞赏 谢谢 GS 因为你想使
  • has_one 有两个外键?

    我有两个类 消息 和 用户 消息具有 sender id 和recipient id 这两个用户的外键 如何建立关系 使我能够获取发件人和收件人的用户 例如 message sender name 和 message recipient n
  • 如何使用 Fabrication 定义特质

    我正在学习如何使用制造 http www fabricationgem org getting started in Rails我们决定更换所有factory girl代码与制造 假设我们有这段代码factory girl FactoryG
  • 查找所有具有重复名称的用户

    我有具有名字和姓氏字段的用户 我需要做一个 ruby 查找根据名字和姓氏具有重复帐户的所有用户 例如 我想要一个查找功能 可以搜索所有其他用户 并查找是否有任何用户具有相同的姓名和电子邮件 我在想像这样的嵌套循环 User all each
  • 如何找到 Rails 中的当前路线?

    我需要知道 Rails 中过滤器中的当前路线 我怎样才能知道它是什么 我正在处理 REST 资源 但没有看到命名路由 如果您尝试对视图中的某些内容进行特殊处理 您可以使用current page as in 或者一个动作和ID 或命名路线
  • 使用 net/http 发送 Post 请求

    我需要将 JSON 数据发送到同一台计算机上运行的另一个应用程序 我像这样发送请求 rails 3 2 13 data some data hash url URI parse http localhost 6379 api plans r

随机推荐