은 현재 레일스 프로젝트에서 작업 중입니다. 난 레일 서버를 시작하려고하면 다음 오류 던지고 :Ruby on Rails - 서버를 실행하는 중에 오류가 발생했습니다.
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/var/lib/gems/1.9.1/gems/activerecord-3.1.3/lib/active_record/connection_adapters
/sqlite_adapter.rb:439:in `table_structure': Could not find table 'dbrick'
(ActiveRecord::StatementInvalid)
내 테이블 이름은 'dbrick'입니다. 나는 또한 rake db : drop과 rake db : mirgrate를 시도했다. 마이그레이션 할 때의 다음과 같은 오류를 던지고 :
rake aborted!
Could not find table 'dbrick'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
이 내 마이그레이션 파일입니다
이class CreateDbricks < ActiveRecord::Migration
def self.up
create_table :dbricks do |t|
t.text :description
t.string :video
t.string :video_html
t.string :image_id
t.string :option_id
t.boolean :choice
t.string :reach
t.integer :category_id
t.string :user_id
t.datetime :deleted_at
t.timestamps
end
end
def self.down
drop_table :dbricks
end
end
그것은 어떤 일이 밖으로 나를 도와 주면 훨씬 가득 도움이 될 것입니다. 미리 감사드립니다.
'rake db : schema : load'을 시도해보십시오. – Trip
당신은 오타가 있습니다 : migration은'dbricks'를 생성하지만, 코드는'dbrick' 테이블을 사용하려고 시도합니다. (복수형 vs 단수형) –
답장을 보내 주셔서 감사합니다. 나중에 나는 rake db : schema : load를 시도했지만 rake aborted와 같은 에러를 준다! 'dbrick'테이블을 찾을 수 없습니다 작업 : TOP => db : migrate => 환경 (--trace를 사용하여 작업을 실행하여 전체 추적 참조) – Abhiram