gpt4 book ai didi

ruby-on-rails-3.1 - Rails 3.1.2 - Bundler 找不到 gem "railties"的兼容版本

转载 作者:行者123 更新时间:2023-12-04 09:20:03 24 4
gpt4 key购买 nike

我正在尝试安装 twitter-bootstrap-rails 的新版本gem (v2),但出现上述错误。这是我的 Gemfile 的外观:

source 'http://rubygems.org'

gem 'rails', '3.1.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'


gem 'mysql2'
gem 'authlogic'
gem "paperclip", "~> 2.4.5"
gem 'aws-s3'
gem 'actionmailer'
gem "twitter-bootstrap-rails", "~> 2.0"
gem 'sunspot_rails'

#endless page
gem 'will_paginate'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.5.rc.2'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end

group :production do
gem 'therubyracer-heroku', '~> 0.8.1.pre3'
gem 'pg'
gem 'thin'
end

group :development do
gem "taps", "~> 0.3.23"
gem "rvm", "~> 1.9.2"
end

gem 'jquery-rails'

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

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

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

并完全错误:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
twitter-bootstrap-rails (~> 2.0) ruby depends on
railties (>= 3.2.1) ruby

sass-rails (~> 3.1.5.rc.2) ruby depends on
railties (3.1.0)

怎么了?当我删除版本时 ~> 2.0从 gem 中,它有效,但我需要新版本的 bootstrap ...

编辑: bundle 安装
Bundler could not find compatible versions for gem "railties":
In snapshot (Gemfile.lock):
railties (3.1.2)

In Gemfile:
twitter-bootstrap-rails (~> 2.0) ruby depends on
railties (>= 3.2.1) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

最佳答案

解决方案:

gem 'rails', '3.2.1'
gem "sass-rails", "~> 3.2.4"
gem "coffee-rails", "~> 3.2.2"

进而
bundle update

关于ruby-on-rails-3.1 - Rails 3.1.2 - Bundler 找不到 gem "railties"的兼容版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9098839/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com