启动rails服务器时出错

时间:2013-06-22 17:56:23

标签: ruby-on-rails

您好我是第一次尝试使用rails进行this练习,当我尝试启动服务器时出现错误。这是错误:

Kayla-Morrisons-MacBook-Pro:blogger kaylamorrison$ rails server
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-darwin12.3.0]

-- control frame ----------
c:0026 p:-17566762144926 s:0077 b:0077 l:000076 d:000076 TOP   
c:0025 p:---- s:0075 b:0075 l:000074 d:000074 CFUNC  :require
c:0024 p:0029 s:0071 b:0071 l:000067 d:000070 BLOCK  /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/sqlite3-1.3.7/lib/sqlite3.rb:6
c:0023 p:0035 s:0068 b:0068 l:000067 d:000067 TOP    /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/sqlite3-1.3.7/lib/sqlite3.rb:2
c:0022 p:---- s:0066 b:0066 l:000065 d:000065 FINISH
c:0021 p:---- s:0064 b:0064 l:000063 d:000063 CFUNC  :require
c:0020 p:0026 s:0060 b:0060 l:000039 d:000059 BLOCK  /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72
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:0091 s:0052 b:0052 l:000039 d:000051 BLOCK  /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70
c:0016 p:---- s:0045 b:0045 l:000044 d:000044 FINISH
c:0015 p:---- s:0043 b:0043 l:000042 d:000042 CFUNC  :each
c:0014 p:0046 s:0040 b:0040 l:000039 d:000039 METHOD /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59
c:0013 p:0021 s:0036 b:0036 l:000035 d:000035 METHOD /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler.rb:132
c:0012 p:0089 s:0032 b:0032 l:000031 d:000031 TOP    /Users/kaylamorrison/Desktop/blogger/config/application.rb:7
c:0011 p:---- s:0030 b:0030 l:000029 d:000029 FINISH
c:0010 p:---- s:0028 b:0028 l:000027 d:000027 CFUNC  :require
c:0009 p:0016 s:0024 b:0024 l:000015 d:000023 BLOCK  /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.13/lib/rails/commands.rb:53
c:0008 p:---- s:0021 b:0021 l:000020 d:000020 FINISH
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC  :tap
c:0006 p:0702 s:0016 b:0016 l:000015 d:000015 TOP    /Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.13/lib/rails/commands.rb:50
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :require
c:0003 p:0061 s:0006 b:0006 l:000d18 d:001468 EVAL   script/rails:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000d18 d:000d18 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
script/rails:6:in `<main>'
script/rails:6:in `require'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
/Users/kaylamorrison/Desktop/blogger/config/application.rb:7:in `<top (required)>'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `<top (required)>'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in <top (required)>'
/Users/kaylamorrison/.rvm/gems/ruby-1.9.2-p320/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require'

-- C level backtrace information -------------------------------------------

[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: 6

我在运行OSX 10.8.4的Mac上使用ruby 1.9.2p320和Rails 3.2.13。非常感谢任何帮助,我发现我必须在星期一之前学习rails并为学校应用程序编写应用程序。

2 个答案:

答案 0 :(得分:1)

尝试再次删除所有gemset和bundle install。如果您使用的是RVM:

rvm gemset empty mygems

然后

bundle install
rails s

答案 1 :(得分:1)

我不得不卸载并重新安装sqlite3,cbascom上面建议的this线程中的说明