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

前端之家收集整理的这篇文章主要介绍了ruby-on-rails-3.1 – Rails 3.1.2 – Bundler找不到gem“railties”的兼容版本前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试安装新版本的twitter-bootstrap-rails gem(v2),但是得到了上面的错误.这就是我的Gemfile的样子:
  1. source 'http://rubygems.org'
  2.  
  3. gem 'rails','3.1.2'
  4.  
  5. # Bundle edge Rails instead:
  6. # gem 'rails',:git => 'git://github.com/rails/rails.git'
  7.  
  8.  
  9. gem 'MysqL2'
  10. gem 'authlogic'
  11. gem "paperclip","~> 2.4.5"
  12. gem 'aws-s3'
  13. gem 'actionmailer'
  14. gem "twitter-bootstrap-rails","~> 2.0"
  15. gem 'sunspot_rails'
  16.  
  17. #endless page
  18. gem 'will_paginate'
  19.  
  20. # Gems used only for assets and not required
  21. # in production environments by default.
  22. group :assets do
  23. gem 'sass-rails','~> 3.1.5.rc.2'
  24. gem 'coffee-rails','~> 3.1.1'
  25. gem 'uglifier','>= 1.0.3'
  26. end
  27.  
  28. group :production do
  29. gem 'therubyracer-heroku','~> 0.8.1.pre3'
  30. gem 'pg'
  31. gem 'thin'
  32. end
  33.  
  34. group :development do
  35. gem "taps","~> 0.3.23"
  36. gem "rvm","~> 1.9.2"
  37. end
  38.  
  39. gem 'jquery-rails'
  40.  
  41. # To use ActiveModel has_secure_password
  42. # gem 'bcrypt-ruby','~> 3.0.0'
  43.  
  44. # Use unicorn as the web server
  45. # gem 'unicorn'
  46.  
  47. # Deploy with Capistrano
  48. # gem 'capistrano'
  49.  
  50. # To use debugger
  51. # gem 'ruby-debug19',:require => 'ruby-debug'

并完成错误

  1. Bundler could not find compatible versions for gem "railties":
  2. In Gemfile:
  3. twitter-bootstrap-rails (~> 2.0) ruby depends on
  4. railties (>= 3.2.1) ruby
  5.  
  6. sass-rails (~> 3.1.5.rc.2) ruby depends on
  7. railties (3.1.0)

怎么了?当我删除版本〜>从宝石2.0,它的工作原理,但我需要新版本的bootstrap …

编辑:捆绑安装

  1. Bundler could not find compatible versions for gem "railties":
  2. In snapshot (Gemfile.lock):
  3. railties (3.1.2)
  4.  
  5. In Gemfile:
  6. twitter-bootstrap-rails (~> 2.0) ruby depends on
  7. railties (>= 3.2.1) ruby
  8.  
  9. Running `bundle update` will rebuild your snapshot from scratch,using only
  10. the gems in your Gemfile,which may resolve the conflict.

解决方法

解:
  1. gem 'rails','3.2.1'
  2. gem "sass-rails","~> 3.2.4"
  3. gem "coffee-rails","~> 3.2.2"

然后

  1. bundle update

猜你在找的Ruby相关文章