我正在尝试从this website学习Rails。
我在Windows上,所以我使用了推荐的Rails-Installer。我需要jquery-rails
gem版本2.0.0用于本教程,因此在我的gem文件中我有:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do
gem 'sqlite3', '1.3.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.4'
gem 'coffee-rails', '~> 3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.2.3'
end
gem 'jquery-rails', '2.0.0'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
可以看出,gem 'jquery-rails', '2.0.0'
中有Gemfile
行。但是,当我运行bundle update
或bundle install
时,我收到此错误:
bbundle install could not find gem ' jquery-rails (= 2.0.0) x96-mingw32' in any of the gem sources listed in your gemfile.
答案 0 :(得分:6)
gem jquery-rails版本'2.0.0'被从rubygems中拉出来 http://rubygems.org/gems/jquery-rails/versions/2.0.0
替换为
gem "jquery-rails", "~> 2.0.1"
并且快乐