이것은 이상한 것입니다. 테스트를 수행하기 위해 레이크를 실행할 때이 오류가 발생하지만 마이그레이션 할 때는 그렇지 않습니다. RVM을 실행 중이므로 아래 셸 덤프는 필요한 정보를 제공해야합니다.소스 중 하나에서 rake-0.9.2.2를 찾을 수 없습니다.
도움을 주시면 감사하겠습니다. 나는이 문제를 가진 다른 몇몇 사람들을 보았지만 아직 나를 위해 일한 해결책은 없다.
감사합니다.
$ rake
Could not find rake-0.9.2.2 in any of the sources
Run `bundle install` to install missing gems.
Could not find rake-0.9.2.2 in any of the sources
Run `bundle install` to install missing gems.
Errors running test:units, test:functionals, test:integration!
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]
$ rails -v
Rails 3.1.6
$ more .rvmrc
rvm [email protected]
$ rake db:rollback
== AddAllLocationsToAlert: reverting =========================================
-- remove_column(...
-> 0.0320s
== AddAllLocationsToAlert: reverted (0.0321s) ================================
------- 편집 ::::
내가 있기 때문에 최신 레일로 업그레이드 한 - 3.2.6. 'bundle exec'를 사용하더라도 오류가 계속 발생합니다. (3.2.6에서는 새로운 것이 아닙니다. 3.1에서 여전히 문제가 발생했습니다.) 정의되지 않은 메소드는 새로운 것입니다.
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle exec rake
Could not find rake-0.9.2.2 in any of the sources
Run `bundle install` to install missing gems.
Could not find rake-0.9.2.2 in any of the sources
Run `bundle install` to install missing gems.
Errors running test:units! #<NoMethodError: undefined method `[]' for nil:NilClass>
Errors running test:functionals! #<RuntimeError: Command failed with status (7): [/Users/ben/.rvm/rubies/ruby-1.9.3-p194/bin...]>
Errors running test:integration! #<RuntimeError: Command failed with status (7): [/Users/ben/.rvm/rubies/ruby-1.9.3-p194/bin...]>
내 Gemfile이 같은 요청 : 당신은 들러를 사용하고 (그리고 레일, 당신은 아마 할) 경우
source 'http://rubygems.org'
gem 'rails', '3.2.6'
group :assets do
gem 'sass-rails', " ~> 3.2.5"
gem 'coffee-rails', "~> 3.2.1"
gem 'uglifier', '>= 1.2.6'
end
gem 'jquery-rails'
gem 'rake'
gem "mysql2"
gem "squeel"
gem 'tinymce-rails'
gem 'dynamic_form'
gem 'will_paginate'
gem 'devise'
gem 'whitelist'
gem 'rmagick'
gem 'json'
gem 'paperclip'
gem 'acts_as_list', :git => 'https://github.com/swanandp/acts_as_list'
gem 'htmlentities'
gem 'formtastic'
# 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
레이크 실행? – bender
당신의 Gemfile의'test' 그룹에있는 보석들은 아마도'rake'의 다른 버전에 의존합니다. –
벤더 : Nope. : Michal : Gemfile에 테스트 그룹이 없습니다. 이전 프로젝트를 기반으로합니다. 레일 1에서 3.0, 3.1에서 끌어 올려졌습니다. 그리고 지금은 3.2이므로 전 기능 세트를 사용하지는 않습니다. 그러나 오래된 보석들이 거기에 매달려 있습니다. 하나는 약간의 레이크 문제를 일으킬 수 있습니다. 이상하게 테스트하고 있습니다. 멀리 옮겨야 만하는 이유 –