【问题标题】:unable to add active resource gem无法添加活动资源宝石
【发布时间】:2013-07-04 00:10:32
【问题描述】:

当我执行 bundle install 命令时出现此错误

Bundler 找不到 gem "activesupport" 的兼容版本: 在 Gemfile 中: activeresource (>= 0) 红宝石取决于 activesupport (= 2.0.1) 红宝石

rails (= 4.0.0.rc1) ruby depends on
  activesupport (4.0.0.rc1)

这是我的 gemfile

source 'https://rubygems.org'
ruby '1.9.3'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.rc1'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0.rc1'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.0.1'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

gem 'execjs'
gem 'therubyracer'
gem 'pg'
gem 'activeresource', :require => 'active_resource'

Ruby => ruby​​ 1.9.3p429(2013-05-15 修订版 40747)[x86_64-linux]

Rails => Rails 4.0.0.rc1

请帮忙!

【问题讨论】:

  • 删除 Gemfile.lock 然后尝试捆绑安装

标签: ruby ruby-on-rails-3.2


【解决方案1】:

试试命令:bundle update 它还将“activesupport”更新到最新版本

【讨论】:

    猜你喜欢
    • 2016-02-09
    • 1970-01-01
    • 1970-01-01
    • 2012-04-21
    • 2010-12-05
    • 1970-01-01
    • 1970-01-01
    • 2014-04-11
    • 1970-01-01
    相关资源
    最近更新 更多