我正在通过最终的ROR tutorial,因为我对Rails是全新的。
当我运行rails -v时,我得到:
Could not find rake-0.9.2 in any of the sources
Run `bundle install` to install missing gems.
我的Gemfile包含:
source 'http://rubygems.org'
gem 'rails', '3.0.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3', '1.3.3'
gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'will_paginate', '3.0.pre2'
gem 'polyglot', '0.3.2'
gem 'rake', '0.9.2'
group :development do
gem 'rspec-rails', '2.6.1'
gem 'annotate', '2.4.0'
gem 'faker', '0.3.1'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
gem 'spork', '0.9.0.rc8'
gem 'factory_girl_rails', '1.0'
gem 'spork', '0.9.0.rc8'
end
gem 'autotest-standalone', :require => 'autotest'
gem 'autotest-rails-pure'
gem 'term-ansicolor'
gem 'turn'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
我已经尝试过bundle install,rvmsudo gem install rake返回:
Successfully installed rake-0.9.2
1 gem installed
有人会想到这会照顾它。
我也试过rvmsudo gem install rails,卸载所有东西并重新开始,这个错误迟早会回来。
答案 0 :(得分:2)
bundle exec rails -v
为你做这件事?
答案 1 :(得分:0)
尝试安装rake gem 0.8.x.我认为0.9.x和0.8.x之间存在一些支持其他宝石的不一致。