2012-07-25 3 views
1

나는 몇 가지 기본적인 것을 놓친 것이 틀림 없다.레일즈, 레이크가 중단되었습니다! 정의되지 않은 메서드 'active_record'

dev 환경에서 제대로 작동하는 앱이 있습니다. 나는 약간의 수정을했는데 정확하게 설명 할 수 없다. (마이그레이션시 seed_dump gem을 삽입하려고 시도했다.) 이제 모든 레이크 명령이 오류가 떨어 :

C:\Programozas\Rails Apps\sorsveto>rake about 
rake aborted! 
undefined method `active_record' for #<Rails::Application::Configuration:0x3e482 
98> 

Tasks: TOP => about => environment 
(See full trace by running task with --trace) 

또는

C:\Programozas\Rails Apps\sorsveto>rake db:migrate 
rake aborted! 
Don't know how to build task 'db:migrate' 

(See full trace by running task with --trace) 

내 gemfile있다

:

source 'https://rubygems.org' 

gem 'rails', '3.2.2' 
gem 'bootstrap-sass', '2.0.0' 
gem 'will_paginate', '3.0.3' 
gem 'bootstrap-will_paginate', '0.0.5' 

group :development do 
    gem 'sqlite3', '1.3.5' 
    gem 'annotate', '~> 2.4.1.beta' 
end 

# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 
    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

group :test, :development do 
    gem 'rspec-rails', '~> 2.8.rc' 
    gem 'shoulda', '~> 3.0.1' 
    gem 'shoulda-context' 
    gem 'shoulda-matchers' 
    gem 'eventmachine', '1.0.0.rc.4' 
    gem 'listen', '0.4.7' 
    gem 'guard-livereload', '1.0.0' 
    gem 'guard-rspec', '0.5.5' 
    gem 'guard-spork', '0.3.2' 
    gem 'spork', '0.9.0' 
end 

group :test do 
    gem 'capybara', '1.1.2' 
    gem 'factory_girl_rails', '1.4.0' 
    gem 'cucumber-rails', '1.2.1' 
    gem 'database_cleaner', '0.7.0' 
end 

# Test gems on Windows 
group :test do 
    gem 'rb-fchange', '0.0.5' 
    gem 'rb-notifu', '0.0.4' 
    gem 'win32console', '1.3.0' 
end 

group :production do 
    gem 'pg', '0.12.2' 
end 

나는이 문제를 해결하는 방법을 알아낼 수 없습니다가. 다시 설치하거나 0.8.7을 설치하고 제거하려고했습니다 (지금 버전 0.9.2.2 있습니다). 0.9.2를 설치하려고했습니다. 여러 조합 (한 번에 둘 이상을 실행하고 exec RAKE XY 번들을 실행할 수 없음). 난 내 보석 파일에이 삽입하려고 :

require 'rake/dsl_definition' 
require 'rake' 

어느 도왔다. 아이디어가 있으십니까? 모든 도움 mutch는 appriciated.

+0

으로 고정? 그것에 대해 물어 pls, 너무 많은 도움이 필요해! – Kael

답변

4

너무 기본적이고 짜증나서 나는 심지어 수치심을 느낍니다. 내 application.rb에서 어떻게 든

내이 라인 :

require "active_record/railtie" 

은 주석. #을 제거하고 제대로 작동했습니다.

0

필자의 경우 내 Gemfile이 어떻게 든 삭제되었습니다. 이 ..

절반 방법 살 때 CMD-C와 레이크 조치를 중단 어쩌면 때문에 나는 너희들이 도와 수 있도록 더 많은 정보가 필요하십니까 git co Gemfile

관련 문제