2011-04-07 9 views
0

안녕하세요,2 장 레일 튜토리얼 - rake db : migrate를 사용한 후 BUS 에러를 얻는다.

$rake db:migrate 

이 레일 튜토리얼의 2 장 http://ruby.railstutorial.org/chapters/a-demo-app에서 사용하려고하면 계속 나타나는 오류 메시지를 이해하지 못합니다.

rvm (최신) 루비 -1.9.2 레일 3.0.6

(나는 ruby-1.9.2-p180과 ruby-1.9-2-head를 사용해 보았습니다. 오류가 이러한 버전 중 하나의 버그로 인해 발생하지만 - 아래에서 같은 결과가 나타납니다.)

단계는 다음과 같습니다.

$ rails new first_app 
$ mate Gemfile 

편집 사용할 gemfile : gem 'rails', ' 3.0.6 ' 보석'sqlite3를 루비 ','1.3.2 ', : 필요를 =>'sqlite3를 '

$ bundle install 
$ rails generate scaffold User name:string email:string 

작동 좋은, 다음 ...

$ rake db:migrate 

오류 :

$ rake db:migrate --trace 
(in /Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again) 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/sqlite3-ruby-1.3.2/lib/sqlite3/sqlite3_native.bundle: [BUG] Bus Error 
ruby 1.9.2p188 (2011-03-28 revision 31204) [i386-darwin10.6.0] 

-- control frame ---------- 
c:0029 p:-8251844 s:0087 b:0087 l:000086 d:000086 TOP 
c:0028 p:---- s:0085 b:0085 l:000084 d:000084 CFUNC :require 
c:0027 p:0029 s:0081 b:0081 l:000077 d:000080 BLOCK /Users/dawnbuie/.rvm/gems/[email protected]/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:6 
c:0026 p:0035 s:0078 b:0078 l:000077 d:000077 TOP /Users/dawnbuie/.rvm/gems/[email protected]/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:2 
c:0025 p:---- s:0076 b:0076 l:000075 d:000075 FINISH 
c:0024 p:---- s:0074 b:0074 l:000073 d:000073 CFUNC :require 
c:0023 p:0026 s:0070 b:0070 l:000051 d:000069 BLOCK /Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:68 
c:0022 p:---- s:0067 b:0067 l:000066 d:000066 FINISH 
c:0021 p:---- s:0065 b:0065 l:000064 d:000064 CFUNC :each 
c:0020 p:0091 s:0062 b:0062 l:000051 d:000061 BLOCK /Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:66 
c:0019 p:---- s:0057 b:0057 l:000056 d:000056 FINISH 
c:0018 p:---- s:0055 b:0055 l:000054 d:000054 CFUNC :each 
c:0017 p:0046 s:0052 b:0052 l:000051 d:000051 METHOD /Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:55 
c:0016 p:0021 s:0048 b:0048 l:000047 d:000047 METHOD /Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler.rb:120 
c:0015 p:0079 s:0044 b:0044 l:000043 d:000043 TOP /Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/config/application.rb:7 
c:0014 p:---- s:0042 b:0042 l:000041 d:000041 FINISH 
c:0013 p:---- s:0040 b:0040 l:000039 d:000039 CFUNC :require 
c:0012 p:0013 s:0036 b:0036 l:000035 d:000035 METHOD <internal:lib/rubygems/custom_require>:29 
c:0011 p:0026 s:0031 b:0031 l:000030 d:000030 TOP /Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/Rakefile:4 
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 FINISH 
c:0009 p:---- s:0027 b:0027 l:000026 d:000026 CFUNC :load 
c:0008 p:0334 s:0023 b:0023 l:000022 d:000022 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2373 
c:0007 p:0009 s:0018 b:0018 l:000011 d:000017 BLOCK /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2007 
c:0006 p:0009 s:0016 b:0016 l:000015 d:000015 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2058 
c:0005 p:0011 s:0012 b:0012 l:000011 d:000011 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2006 
c:0004 p:0021 s:0009 b:0009 l:000008 d:000008 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:1991 
c:0003 p:0139 s:0006 b:0006 l:000b74 d:000ed4 EVAL /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/bin/rake:35 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:000b74 d:000b74 TOP 
--------------------------- 
-- Ruby level backtrace information ---------------------------------------- 
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/bin/rake:35:in `<main>' 
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:1991:in `run' 
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile' 
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling' 
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile' 
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile' 
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2373:in `load' 
/Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/Rakefile:4:in `<top (required)>' 
<internal:lib/rubygems/custom_require>:29:in `require' 
<internal:lib/rubygems/custom_require>:29:in `require' 
/Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/config/application.rb:7:in `<top (required)>' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler.rb:120:in `require' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `require' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `each' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `block in require' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `each' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:68:in `block (2 levels) in require' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/bundler-1.0.11/lib/bundler/runtime.rb:68:in `require' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:2:in `<top (required)>' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:6:in `rescue in <top (required)>' 
/Users/dawnbuie/.rvm/gems/[email protected]/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:6:in `require' 

-- C level backtrace information ------------------------------------------- 
0 libruby.1.9.1.dylib     0x00195cb6 rb_vm_bugreport + 230 
1 libruby.1.9.1.dylib     0x0003f0bf report_bug + 415 
2 libruby.1.9.1.dylib     0x0003f16b rb_bug + 43 
3 libruby.1.9.1.dylib     0x0010df5b sigbus + 27 
4 libSystem.B.dylib     0x97b8246b _sigtramp + 43 
5 ???         0xffffffff 0x0 + 4294967295 
6 libruby.1.dylib      0x00754f27 rb_intern + 62 
7 libruby.1.dylib      0x0070b7b2 rb_define_module + 32 
8 sqlite3_native.bundle    0x004f160f Init_sqlite3_native + 27 
9 libruby.1.9.1.dylib     0x00004b84 dln_load + 244 
10 libruby.1.9.1.dylib     0x001791db rb_vm_call_cfunc + 187 
11 libruby.1.9.1.dylib     0x0004637e rb_require_safe + 1022 
12 libruby.1.9.1.dylib     0x00191020 vm_call_method + 944 
13 libruby.1.9.1.dylib     0x0017a855 vm_exec_core + 5397 
14 libruby.1.9.1.dylib     0x00184afd vm_exec + 1821 
15 libruby.1.9.1.dylib     0x00184fe6 rb_iseq_eval + 358 
16 libruby.1.9.1.dylib     0x00044fb5 rb_load_internal + 293 
17 libruby.1.9.1.dylib     0x000463b2 rb_require_safe + 1074 
18 libruby.1.9.1.dylib     0x00191020 vm_call_method + 944 
19 libruby.1.9.1.dylib     0x0017a855 vm_exec_core + 5397 
20 libruby.1.9.1.dylib     0x00184afd vm_exec + 1821 
21 libruby.1.9.1.dylib     0x0019232c rb_yield + 604 
22 libruby.1.9.1.dylib     0x0000ac1e rb_ary_each + 62 
23 libruby.1.9.1.dylib     0x00191020 vm_call_method + 944 
24 libruby.1.9.1.dylib     0x0017a855 vm_exec_core + 5397 
25 libruby.1.9.1.dylib     0x00184afd vm_exec + 1821 
26 libruby.1.9.1.dylib     0x0019232c rb_yield + 604 
27 libruby.1.9.1.dylib     0x0000ac1e rb_ary_each + 62 
28 libruby.1.9.1.dylib     0x00191020 vm_call_method + 944 
29 libruby.1.9.1.dylib     0x0017a855 vm_exec_core + 5397 
30 libruby.1.9.1.dylib     0x00184afd vm_exec + 1821 
31 libruby.1.9.1.dylib     0x00184fe6 rb_iseq_eval + 358 
32 libruby.1.9.1.dylib     0x00044fb5 rb_load_internal + 293 
33 libruby.1.9.1.dylib     0x000463b2 rb_require_safe + 1074 
34 libruby.1.9.1.dylib     0x00191020 vm_call_method + 944 
35 libruby.1.9.1.dylib     0x0017a855 vm_exec_core + 5397 
36 libruby.1.9.1.dylib     0x00184afd vm_exec + 1821 
37 libruby.1.9.1.dylib     0x00184fe6 rb_iseq_eval + 358 
38 libruby.1.9.1.dylib     0x00044fb5 rb_load_internal + 293 
39 libruby.1.9.1.dylib     0x00046998 rb_f_load + 136 
40 libruby.1.9.1.dylib     0x00175845 call_cfunc + 581 
41 libruby.1.9.1.dylib     0x00191020 vm_call_method + 944 
42 libruby.1.9.1.dylib     0x0017a855 vm_exec_core + 5397 
43 libruby.1.9.1.dylib     0x00184afd vm_exec + 1821 
44 libruby.1.9.1.dylib     0x00184e57 rb_iseq_eval_main + 535 
45 libruby.1.9.1.dylib     0x000425e9 ruby_exec_internal + 153 
46 libruby.1.9.1.dylib     0x00044b4a ruby_run_node + 90 
47 ruby        0x00001f1f main + 95 
48 ruby        0x00001eb5 start + 53 

[NOTE] 
You may have encountered a bug in the Ruby interpreter or extension libraries. 
Bug reports are welcome. 
For details: http://www.ruby-lang.org/bugreport.html 

Abort trap 

sqlite3 버전에 문제가 있습니까? 루비? http://www.ruby-lang.org/bugreport.html의 bugreports를 보았지만 일치하는 것은 없습니다.

어떤 통찰력을 주셔서 감사합니다

답변

0

그것은 당신이 SQLite는 또는 sqlite3를-루비 보석 (또는 둘 다)를 다시 컴파일해야 할 수도 있습니다처럼 들린다.

$ gem uninstall sqlite3 sqlite3-ruby 
$ gem install sqlite3 
$ bundle install 

실행 해보십시오합니다 (sqlite3를-루비 보석이 자동으로 번들 명령으로 다시 설치할 수 있습니다.)

+0

나는 그것을 시도했지만 도움이되지 못했습니다. 같은 오류. –

1

난 그냥 우분투에서 같은 문제를 디버깅. Windows에서 비슷한 문제가있을 수 있습니다.

문제점은 내 PATH에 1.8 gems 폴더가 있었고 rvm bin 이전에 sqlite 원시 컴파일이 망가졌습니다.

그래서 먼저 rvm 앞에 1.8 개의 dir이 없는지 확인하십시오. 그런 다음 Michael의 단계에 따라 보석을 제거하고 다시 설치하십시오.