4

我正在尝试从这个网站学习 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 updatebundle install收到此错误时:

bbundle install could not find gem ' jquery-rails (= 2.0.0) x96-mingw32' in any of the gem sources listed in your gemfile.
4

1 回答 1

6

gem jquery-rails 版本 '2.0.0' 从 ruby​​gems
http://rubygems.org/gems/jquery-rails/versions/2.0.0

用。。。来代替

gem "jquery-rails", "~> 2.0.1"

而且要快乐

于 2012-12-28T17:24:38.463 回答