I am trying to set up a RoR development environment on my Windows 7 PC.
I have so far been able to:
Install Ruby
Install Rails
Install a few gems, including the mysql2 gem (I had to download and install the MySQL community server again, since the one which came with XAMPP was 32 bit, and my Ruby is 64 bit)
Execute the 'Rails New' command to create a project
Run 'Bundler Install' command
Now however, when I try to run the server from the project root, I am getting a huge error message of more than 600 lines, beginning with:
C:\Users\Chinmay\Documents\Sites\TaxCloud>rails s
C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/mysql2-0.3.16/mysql2/mysql2.so:
[BUG] Segmentation fault ruby 2.1.4p265 (2014-10-27 revision 48166)
[x64-mingw32]
-- Control frame information ----------------------------------------------- c:0020 p:-10803034 s:0067 e:000066 TOP [FINISH] c:0019 p:---- s:0065 e:000064 CFUNC
:require c:0018 p:0083 s:0061 e:000060 TOP
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql2-0.3.16/lib/mysql2.rb:8
[FINISH] c:0017 p:---- s:0059 e:000058 CFUNC :require c:0016 p:0037
s:0055 e:000054 BLOCK
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:76
[FINISH] c:0015 p:---- s:0052 e:000051 CFUNC :each c:0014 p:0055
s:0049 e:000048 BLOCK
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:72
[FINISH] c:0013 p:---- s:0042 e:000041 CFUNC :each c:0012 p:0030
s:0039 e:000038 METHOD
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:61
c:0011 p:0013 s:0035 e:000034 METHOD
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler.rb:133
c:0010 p:0047 s:0031 e:000030 TOP
C:/Users/Chinmay/Documents/Sites/TaxCloud/config/application.rb:7
[FINISH] c:0009 p:---- s:0029 e:000028 CFUNC :require c:0008 p:0014
s:0025 e:000024 BLOCK
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb
:79 [FINISH] c:0007 p:---- s:0022 e:000021 CFUNC :tap c:0006 p:0031
s:0019 e:000018 METHOD
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb
:76 c:0005 p:0033 s:0016 e:000015 METHOD
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb
:40 c:0004 p:0116 s:0012 e:000011 TOP
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands.rb:17
[FINISH] c:0003 p:---- s:0008 e:000007 CFUNC :require c:0002 p:0034
s:0004 E:000218 EVAL bin/rails:4 [FINISH] c:0001 p:0000 s:0002
E:000a78 TOP [FINISH]
-- Ruby level backtrace information ---------------------------------------- bin/rails:4:in <main>' bin/rails:4:inrequire'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands.rb:17:in
<top (required)>'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:40:in
run_command!'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in
server'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in
tap'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:79:in
block in server'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:79:in
require'
C:/Users/Chinmay/Documents/Sites/TaxCloud/config/application.rb:7:in
<top (required)>'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler.rb:133:in
require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in
require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in
each'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in
block in require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in
each'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:76:in
block (2 levels) in require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:76:in
require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql2-0.3.16/lib/mysql2.rb:8:in
<top (required)>'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql2-0.3.16/lib/mysql2.rb:8:in
require'
-- C level backtrace information ------------------------------------------- C:\Windows\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0xa)
[0x0000000077B3F6FA]
C:\Windows\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x9c)
[0x000007FEFE1810DC]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_bugreport+0xa4)
[0x000000006B417364]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_name_err_mesg_new+0x841)
[0x000000006B2C9801]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_bug+0x45)
[0x000000006B2CA545]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_check_safe_str+0x351)
[0x000000006B398E11] [0x0000000000401A85]
C:\Windows\SYSTEM32\ntdll.dll(_C_specific_handler+0x9c)
[0x0000000077B04F58]
C:\Windows\SYSTEM32\ntdll.dll(RtlCompareUnicodeString+0x7d)
[0x0000000077B24F4D]
C:\Windows\SYSTEM32\ntdll.dll(RtlTimeToSecondsSince1970+0x63c)
[0x0000000077B05B3C]
C:\Windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e)
[0x0000000077B3F638] [0x000003B7A8300000] [0x000000000202343D]
C:\Ruby21-x64\lib\ruby\gems\2.1.0\extensions\x64-mingw32\2.1.0\mysql2-0.3.16\mysql2\mysql2.so(Init_mysql2+0x5a)
[0x000000000202 43BA]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(dln_load+0x1d6)
[0x000000006B281646]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_call_cfunc+0x130)
[0x000000006B414300]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_require_safe+0x56f)
[0x000000006B2D558F]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_error_arity+0x1c6)
[0x000000006B402206]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_f_send+0x5c1)
[0x000000006B411601]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x1618)
[0x000000006B406C98]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x5a8d)
[0x000000006B40B10D]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_iseq_eval+0x183)
[0x000000006B413C23]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_rubylevel_errinfo+0x66c)
[0x000000006B2D396C]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_require_safe+0x5a9)
[0x000000006B2D55C9]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_error_arity+0x1c6)
[0x000000006B402206]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x1618)
[0x000000006B406C98]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x5a8d)
[0x000000006B40B10D]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_funcall+0x503)
[0x000000006B40C503]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_yield+0x74)
[0x000000006B4134D4]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_ary_each+0x51)
[0x000000006B281971]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_error_arity+0x1c6)
[0x000000006B402206]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x1f61)
[0x000000006B4075E1]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x5a8d)
[0x000000006B40B10D]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_funcall+0x503)
[0x000000006B40C503]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_yield+0x74)
[0x000000006B4134D4]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_ary_each+0x51)
[0x000000006B281971]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_error_arity+0x1c6)
[0x000000006B402206]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_f_send+0x5c1)
[0x000000006B411601]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x1f61)
[0x000000006B4075E1]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x5a8d)
[0x000000006B40B10D]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_iseq_eval+0x183)
[0x000000006B413C23]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_rubylevel_errinfo+0x66c)
[0x000000006B2D396C]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_require_safe+0x5a9)
[0x000000006B2D55C9]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_error_arity+0x1c6)
[0x000000006B402206]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_f_send+0x5c1)
[0x000000006B411601]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x1618)
[0x000000006B406C98]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x5a8d)
[0x000000006B40B10D]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_funcall+0x503)
[0x000000006B40C503]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_yield+0x74)
[0x000000006B4134D4]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_obj_tap+0x16)
[0x000000006B32D5C6]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_error_arity+0x1c6)
[0x000000006B402206]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_f_send+0x5c1)
[0x000000006B411601]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x1f61)
[0x000000006B4075E1]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x5a8d)
[0x000000006B40B10D]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_iseq_eval+0x183)
[0x000000006B413C23]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_rubylevel_errinfo+0x66c)
[0x000000006B2D396C]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_require_safe+0x5a9)
[0x000000006B2D55C9]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_error_arity+0x1c6)
[0x000000006B402206]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_f_send+0x5c1)
[0x000000006B411601]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x1618)
[0x000000006B406C98]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_vm_localjump_error+0x5a8d)
[0x000000006B40B10D]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_iseq_eval_main+0x1d0)
[0x000000006B413E40]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(rb_check_copyable+0x304a)
[0x000000006B2CF31A]
C:\Ruby21-x64\bin\x64-msvcrt-ruby210.dll(ruby_run_node+0x51)
[0x000000006B2D2231] [0x0000000000402D14] [0x00000000004013D7]
[0x00000000004014F8]
C:\Windows\system32\kernel32.dll(BaseThreadInitThunk+0xd)
[0x000000007763F34D]
-- Other runtime information -----------------------------------------------
Loaded script: bin/rails
Loaded features:
0 enumerator.so
1 C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/enc/encdb.so
2 C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/enc/iso_8859_1.so
3 C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/enc/trans/transdb.so
4 C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/rbconfig.rb
5 thread.rb
6 C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/thread.so
7 C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/compatibility.rb
8 C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/defaults.rb
9 C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/deprecate.rb
And ending with:
580
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.7/lib/active_support/number_helper.rb
581
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/actionview-4.1.7/lib/action_view/helpers/number_helper.rb
582
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.7/lib/active_support/core_ext/module/concerning.rb
583
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.7/lib/active_support/core_ext/module/qualified_const.rb
584
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.7/lib/active_support/core_ext/module.rb
585
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/actionview-4.1.7/lib/action_view/record_identifier.rb
586
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/actionview-4.1.7/lib/action_view/helpers/record_tag_helper.rb 587
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/actionview-4.1.7/lib/action_view/helpers/rendering_helper.rb
588
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/actionview-4.1.7/lib/action_view/helpers/translation_helper.rb
589
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/actionview-4.1.7/lib/action_view/helpers.rb
590
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.2.0/lib/sprockets/rails/helper.rb
591
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.2.0/lib/sprockets/rails/version.rb
592
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/engine/configuration.rb
593
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/application/configuration.rb
594
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.2.0/lib/sprockets/railtie.rb
595
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.7/lib/rails/all.rb
596
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql2-0.3.16/lib/mysql2/version.rb
597
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql2-0.3.16/lib/mysql2/error.rb
[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
This application has requested the Runtime to terminate it in an
unusual way. Please contact the application's support team for more
information.
[NOTE] You may have encountered a bug in the Ruby Interpreter or
extension libraries. Bug reports and welcome.
For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
So, what do I need to do, to ride ruby on rails?
BTW: Initially I thought the problem could have been with the Webrick Server. So I have configured apache manually to listen to port 3000. However, this hasn't helped.
Another concern is that I can neither see the full output in the command prompt, nor can I save it to a text file. So I do not really know what the full error message is.
Webrick uses port 3000. Don't set Apache to listen to port 3000 because that will create a port conflict. Start webrick from the command line with 'rails s'.
Related
I am trying to run a Ruby on Rails application on my development environment (Ubuntu 14.04). rails s does not report errors and Webrick seems to start properly:
$ rails s
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2015-04-30 08:52:32] INFO WEBrick 1.3.1
[2015-04-30 08:52:32] INFO ruby 1.9.3 (2014-11-13) [x86_64-linux]
[2015-04-30 08:52:32] INFO WEBrick::HTTPServer#start: pid=15523 port=3000
However, once I try to access the application through a web browser Webrick crashes with the following error:
/home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:98: [BUG] Segmentation fault
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0016 p:---- s:0060 b:0060 l:000059 d:000059 CFUNC :select
c:0015 p:0106 s:0053 b:0053 l:000043 d:000052 BLOCK /home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:98
c:0014 p:0007 s:0047 b:0047 l:000046 d:000046 METHOD /home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:22
c:0013 p:0063 s:0044 b:0044 l:000043 d:000043 METHOD /home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:89
c:0012 p:0118 s:0039 b:0039 l:000038 d:000038 METHOD /home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/rack-1.4.5/lib/rack/handler/webrick.rb:13
c:0011 p:0294 s:0034 b:0034 l:002200 d:002200 METHOD /home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/rack-1.4.5/lib/rack/server.rb:268
c:0010 p:0231 s:0028 b:0028 l:0011a0 d:0011a0 METHOD /home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.13/lib/rails/commands/server.rb:70
c:0009 p:0063 s:0024 b:0024 l:000015 d:000023 BLOCK /home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.13/lib/rails/commands.rb:55
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 /home/desousa/.rvm/gems/ruby-1.9.3-p551/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:0016e8 d:001838 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:0016e8 d:0016e8 TOP
-- Ruby level backtrace information ----------------------------------------
script/rails:6:in `<main>'
script/rails:6:in `require'
/home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
/home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
/home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
/home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
/home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
/home/desousa/.rvm/gems/ruby-1.9.3-p551/gems/rack-1.4.5/lib/rack/handler/webrick.rb:13:in `run'
/home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:89:in `start'
/home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:22:in `start'
/home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:98:in `block in start'
/home/desousa/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/webrick/server.rb:98:in `select'
-- C level backtrace information -------------------------------------------
SEGV received in SEGV handler
Aborted (core dumped)
The software versions I am using in this project:
$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
$ rails -v
Rails 3.2.13
What could be the cause of this? Or can I do to understand the cause?
I had some touble with Webrick too that caused a segementation fault. I only had this on one specific ubuntu box but I didn't have the same error on other ubuntu boxes with the exact same setup. Lately I solved it using thin. To do this add this to your Gemfile:
gem 'thin'
Then run
bundle install
rails server
Having some seriously strange problems with my rails install, any help much appreciated.
It all began when I ran bundle clean --force hoping to solve some gem issues with a project. I then ran bundle install, but things were never the same. First, I had a weird [BUG] cross-thread violation on rb_gc() error when running rails s. After running gem clean I managed to move on to a new error:
bundle exec rails s
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/rubyeventmachine.bundle: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]
-- Control frame information -----------------------------------------------
c:0034 p:-17535289580530 s:0105 b:0105 l:000104 d:000104 TOP
c:0033 p:---- s:0103 b:0103 l:000102 d:000102 CFUNC :require
c:0032 p:0010 s:0099 b:0099 l:000091 d:000098 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251
c:0031 p:0071 s:0097 b:0097 l:000096 d:000096 METHOD /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236
c:0030 p:0019 s:0092 b:0092 l:000091 d:000091 METHOD /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251
c:0029 p:0150 s:0087 b:0087 l:000086 d:000086 TOP /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:66
c:0028 p:---- s:0085 b:0085 l:000084 d:000084 FINISH
c:0027 p:---- s:0083 b:0083 l:000082 d:000082 CFUNC :require
c:0026 p:0010 s:0079 b:0079 l:000071 d:000078 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251
c:0025 p:0071 s:0077 b:0077 l:000076 d:000076 METHOD /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236
c:0024 p:0019 s:0072 b:0072 l:000071 d:000071 METHOD /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251
c:0023 p:0083 s:0067 b:0067 l:000066 d:000066 TOP /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin.rb:7
c:0022 p:---- s:0065 b:0065 l:000064 d:000064 FINISH
c:0021 p:---- s:0063 b:0063 l:000062 d:000062 CFUNC :require
c:0020 p:0026 s:0059 b:0059 l:000039 d:000058 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:68
c:0019 p:---- s:0056 b:0056 l:000055 d:000055 FINISH
c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC :each
c:0017 p:0091 s:0051 b:0051 l:000039 d:000050 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:66
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/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:55
c:0013 p:0021 s:0036 b:0036 l:000035 d:000035 METHOD /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler.rb:119
c:0012 p:0089 s:0032 b:0032 l:000031 d:000031 TOP /Users/yuletide/code/txtyourcity_rails/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/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/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/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/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:000df8 d:0008c8 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:000df8 d:000df8 TOP
-- Ruby level backtrace information ----------------------------------------
script/rails:6:in `'
script/rails:6:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:50:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in '
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:53:in `require'
/Users/yuletide/code/txtyourcity_rails/config/application.rb:7:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `block in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `each'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin.rb:7:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:66:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
-- C level backtrace information -------------------------------------------
See Crash Report log file under ~/Library/Logs/CrashReporter or
/Library/Logs/CrashReporter, for the more detail of.
-- Other runtime information -----------------------------------------------
* Loaded script: script/rails
* Loaded features:
0 enumerator.so
1 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/enc/encdb.bundle
2 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/enc/trans/transdb.bundle
3 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
4 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/rbconfig.rb
5 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
6 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
7 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
8 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb
9 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/pathname.bundle
10 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/pathname.rb
11 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
12 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/etc.bundle
13 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb
14 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
15 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
16 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
17 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
18 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
19 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/psych.bundle
20 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/stringio.bundle
21 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/node.rb
22 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/stream.rb
23 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/document.rb
24 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/sequence.rb
25 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/scalar.rb
26 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/mapping.rb
27 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/alias.rb
28 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes.rb
29 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/streaming.rb
30 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/visitors/visitor.rb
31 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/strscan.bundle
... snip ...
2.0.2/lib/simple_form/wrappers/builder.rb
629 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/simple_form-2.0.2/lib/simple_form/wrappers/many.rb
630 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/simple_form-2.0.2/lib/simple_form/wrappers/single.rb
631 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/simple_form-2.0.2/lib/simple_form/wrappers/root.rb
632 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/simple_form-2.0.2/lib/simple_form.rb
633 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/timeout.rb
[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
[1] 1577 abort bundle exec rails s
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.21
- RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [x86_64-darwin11.3.0]
- INSTALLATION DIRECTORY: /Users/ayule/.rvm/gems/ruby-1.9.3-p125
- RUBY EXECUTABLE: /Users/ayule/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
- EXECUTABLE DIRECTORY: /Users/ayule/.rvm/gems/ruby-1.9.3-p125/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/ayule/.rvm/gems/ruby-1.9.3-p125
- /Users/ayule/.rvm/gems/ruby-1.9.3-p125#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
rvm seems to be working fine:
code/txtyourcity_rails(master) ☸ which ruby
/Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
code/txtyourcity_rails(master) ☸ which rails
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/bin/rails
Just guessing - have you build your ruby using clang/LLVM, ruby is not yet ready for it, the bug should be reported most likely to bundler / ruby.
To fix follow instructions from my other answer https://stackoverflow.com/a/10540282/497756 to similar problem.
Not sure what caused it initially, but managed to get the error to go away by upgrading to 1.9.3-p194 with rvm, creating a .rvmrc, and then running bundle install
So I'm trying to learn Ruby and rails from Lynda.com When I get to the database sections the teacher has us do this schema dump with rake but it aborts and I cant figure out whats wrong (I'm very new to all this so please forgive me =))
OS: Lion
Ruby: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
Rails: Rails 3.2.3
Rake: rake (0.9.2.2)
$PATH: /usr/local/Cellar:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
All the gems should be up to date ( just reinstalled the other day ). If you need to know anything else to help troubleshoot please let me know!
This is the errors I'm getting:
Alex$ rake db:schema:dump
rake aborted!
cannot load such file -- bundler/setup
(See full trace by running task with --trace)
Alex$ rake --trace
rake aborted!
cannot load such file -- bundler/setup
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/Alex/Sites/simple_cms/config/boot.rb:6:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/Alex/Sites/simple_cms/config/application.rb:1:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/Alex/Sites/simple_cms/Rakefile:5:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:501:in `raw_load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:82:in `block in load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:81:in `load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:65:in `block in run'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/usr/local/bin/rake:32:in `<main>'
Got this when I tried to reinstall budel and run this command:
Alex$ bundle exec rake db:schema:dump
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
-- Control frame information -----------------------------------------------
c:0030 p:-17562901266652 s:0090 b:0090 l:000089 d:000089 TOP
c:0029 p:---- s:0088 b:0088 l:000087 d:000087 CFUNC :require
c:0028 p:0119 s:0084 b:0084 l:000083 d:000083 TOP /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9
c:0027 p:---- s:0082 b:0082 l:000081 d:000081 FINISH
c:0026 p:---- s:0080 b:0080 l:000079 d:000079 CFUNC :require
c:0025 p:0026 s:0076 b:0076 l:000056 d:000075 BLOCK /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:68
c:0024 p:---- s:0073 b:0073 l:000072 d:000072 FINISH
c:0023 p:---- s:0071 b:0071 l:000070 d:000070 CFUNC :each
c:0022 p:0091 s:0068 b:0068 l:000056 d:000067 BLOCK /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66
c:0021 p:---- s:0062 b:0062 l:000061 d:000061 FINISH
c:0020 p:---- s:0060 b:0060 l:000059 d:000059 CFUNC :each
c:0019 p:0046 s:0057 b:0057 l:000056 d:000056 METHOD /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55
c:0018 p:0021 s:0053 b:0053 l:000052 d:000052 METHOD /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119
c:0017 p:0089 s:0049 b:0049 l:000048 d:000048 TOP /Users/Alex/Sites/simple_cms/config/application.rb:7
c:0016 p:---- s:0047 b:0047 l:000046 d:000046 FINISH
c:0015 p:---- s:0045 b:0045 l:000044 d:000044 CFUNC :require
c:0014 p:0026 s:0041 b:0041 l:000040 d:000040 TOP /Users/Alex/Sites/simple_cms/Rakefile:5
c:0013 p:---- s:0039 b:0039 l:000038 d:000038 FINISH
c:0012 p:---- s:0037 b:0037 l:000036 d:000036 CFUNC :load
c:0011 p:0013 s:0033 b:0033 l:000032 d:000032 METHOD /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25
c:0010 p:0274 s:0029 b:0029 l:000028 d:000028 METHOD /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:501
c:0009 p:0009 s:0024 b:0024 l:000017 d:000023 BLOCK /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:82
c:0008 p:0009 s:0022 b:0022 l:000021 d:000021 METHOD /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133
c:0007 p:0011 s:0018 b:0018 l:000017 d:000017 METHOD /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:81
c:0006 p:0019 s:0015 b:0015 l:000008 d:000014 BLOCK /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:65
c:0005 p:0009 s:0013 b:0013 l:000012 d:000012 METHOD /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133
c:0004 p:0011 s:0009 b:0009 l:000008 d:000008 METHOD /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63
c:0003 p:0048 s:0006 b:0006 l:0003a8 d:000a48 EVAL /usr/local/bin/rake:32
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0003a8 d:0003a8 TOP
......
[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
Alex$
The error is to long to fit into this field.
Install rvm
Create a new gemset for ur project. Im betting youre using aystem ruby that comes with Lion in some regards
I've resolved this by running:
gem install bundler
If you try that and it shows you have bundler installed, try typing:
bundle exec rake db:schema:dump
You may be running the command outside the scope of the current bundle.
Here's a bit more background information on why you need to add bundle exec in front of your rake commands:
http://gembundler.com/
Also, note that rake isn't required in your 'Gemfile' as long as you have rails specified. rake installs as a dependency of rails. To see the correlation, take a look at your Gemfile.lock.
Once you install rvm, add the following to a file named .rvmrc in the root directory of your project:
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
&& -s "${rvm_path:-$HOME/.rvm}/environments/ruby-1.9.3-p125#MYPROJECTNAME" ]] ; then
\. "${rvm_path:-$HOME/.rvm}/environments/ruby-1.9.3-p125#MYPROJECTNAME"
else
rvm --create use "ruby-1.9.3-p125#MYPROJECTNAME"
fi
Substitute your project name for "MYPROJECTNAME" and the appropriate ruby version where you see ruby-1.9.3-p125. Then when you change into that directory, rvm will automatically set the gemset and ruby version for you.
The problem seems to be that I installed bundle after I installed ruby & rails. I uninstalled ruby and all my gems (but left bundle and homebrew) and then used rvm to install the latest ruby and rails.
Also note I did not use sudo unless it required me to. I think this put the files in a different place and that might have also helped.
rake commands are now working (with out using the bundle command before it).
So basically I had bundle installed and then did everything this guy did at the bottom of his questions ( #5 gave me and error and did not install ).
How do you install (build) Ruby 1.9.3 on OSX Lion?
Hope this helps anyone else running into the same problem I did.
Ok so i have a rails application that I am attempting to run the migrations on a postgres db and I usually use mysql and all is good but when i run the command i get this
rake db:migrate
(in /Users/tamer/Sites/my_app)
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:487: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
-- control frame ----------
c:0058 p:---- s:0215 b:0215 l:000214 d:000214 CFUNC :exec
c:0057 p:0040 s:0211 b:0211 l:000191 d:000210 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0056 p:0005 s:0208 b:0208 l:000198 d:000207 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract_adapter.r
c:0055 p:0032 s:0206 b:0206 l:000205 d:000205 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21
c:0054 p:0052 s:0199 b:0199 l:000198 d:000198 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract_adapter.r
c:0053 p:0018 s:0192 b:0192 l:000191 d:000191 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0052 p:0013 s:0187 b:0187 l:000186 d:000186 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0051 p:0011 s:0184 b:0184 l:000183 d:000183 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0050 p:0136 s:0180 b:0180 l:000179 d:000179 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0049 p:0131 s:0177 b:0177 l:000176 d:000176 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0048 p:0054 s:0174 b:0174 l:000173 d:000173 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0047 p:---- s:0167 b:0167 l:000166 d:000166 FINISH
c:0046 p:---- s:0165 b:0165 l:000164 d:000164 CFUNC :new
c:0045 p:0186 s:0158 b:0158 l:000157 d:000157 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter
c:0044 p:0045 s:0149 b:0149 l:000148 d:000148 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0043 p:0011 s:0146 b:0146 l:000145 d:000145 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0042 p:0048 s:0142 b:0142 l:000128 d:000141 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0041 p:---- s:0139 b:0139 l:000138 d:000138 FINISH
c:0040 p:---- s:0137 b:0137 l:000136 d:000136 CFUNC :loop
c:0039 p:0009 s:0134 b:0134 l:000128 d:000133 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0038 p:0019 s:0132 b:0132 l:000131 d:000131 METHOD /Users/tamer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201
c:0037 p:0013 s:0129 b:0129 l:000128 d:000128 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0036 p:0030 s:0126 b:0123 l:000122 d:000122 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0035 p:0033 s:0120 b:0120 l:000119 d:000119 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0034 p:0018 s:0115 b:0115 l:000114 d:000114 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0033 p:0011 s:0112 b:0112 l:000111 d:000111 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connectio
c:0032 p:0020 s:0109 b:0109 l:000108 d:000108 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/migration.rb:486
c:0031 p:---- s:0103 b:0103 l:000102 d:000102 FINISH
c:0030 p:---- s:0101 b:0101 l:000100 d:000100 CFUNC :new
c:0029 p:0020 s:0095 b:0095 l:000094 d:000094 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/migration.rb:433
c:0028 p:0083 s:0090 b:0090 l:000089 d:000089 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/migration.rb:415
c:0027 p:0102 s:0085 b:0085 l:000d58 d:000084 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:142
c:0026 p:---- s:0083 b:0083 l:000082 d:000082 FINISH
c:0025 p:---- s:0081 b:0081 l:000080 d:000080 CFUNC :call
c:0024 p:0043 s:0076 b:0076 l:000067 d:000075 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:636
c:0023 p:---- s:0073 b:0073 l:000072 d:000072 FINISH
c:0022 p:---- s:0071 b:0071 l:000070 d:000070 CFUNC :each
c:0021 p:0171 s:0068 b:0068 l:000067 d:000067 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:631
c:0020 p:0110 s:0064 b:0064 l:000058 d:000063 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:597
c:0019 p:0019 s:0062 b:0062 l:000061 d:000061 METHOD /Users/tamer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201
c:0018 p:0033 s:0059 b:0059 l:000058 d:000058 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:590
c:0017 p:0048 s:0053 b:0053 l:000052 d:000052 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:583
c:0016 p:0045 s:0048 b:0048 l:000047 d:000047 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2051
c:0015 p:0012 s:0041 b:0041 l:000026 d:000040 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2029
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :each
c:0012 p:0069 s:0033 b:0033 l:000026 d:000032 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2029
c:0011 p:0009 s:0031 b:0031 l:000030 d:000030 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/airbrake-3.0.9/lib/airbrake/rake_handler.rb:33
c:0010 p:0011 s:0027 b:0027 l:000026 d:000026 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2023
c:0009 p:0029 s:0024 b:0024 l:000017 d:000023 BLOCK /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2001
c:0008 p:0009 s:0022 b:0022 l:000021 d:000021 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2068
c:0007 p:0011 s:0018 b:0018 l:000017 d:000017 METHOD /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:1998
c:0006 p:0036 s:0015 b:0015 l:000014 d:000014 TOP /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/bin/rake:31
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :load
c:0003 p:0127 s:0007 b:0007 l:0014e8 d:000f40 EVAL /Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/bin/rake:19
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0014e8 d:0014e8 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/bin/rake:19:in `<main>'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/bin/rake:19:in `load'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/airbrake-3.0.9/lib/airbrake/rake_handler.rb:33:in `standard_exception_handling'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/tamer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:142:in `block (2 levels) in <top (required)>'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/migration.rb:415:in `migrate'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/migration.rb:433:in `up'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/migration.rb:433:in `new'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/migration.rb:486:in `initialize'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:316:in `retrieve_connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:93:in `connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `checkout'
/Users/tamer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `block in checkout'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `loop'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `block (2 levels) in checkout'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in `checkout_new_connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:228:in `new_connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:25:in `postgresql_connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:25:in `new'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:228:in `initialize'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:939:in `connect'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:956:in `configure_connection'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:278:in `set_standard_conforming_strings'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:699:in `client_min_messages'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:483:in `query'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:195:in `log'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:197:in `block in log'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:487:in `block in query'
/Users/tamer/.rvm/gems/ruby-1.9.2-p290#my_app/gems/activerecord-3.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:487:in `exec'
-- 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
My database.yml file looks like this
development:
encoding: unicode
adapter: postgresql
username: postgres
port: 5432
host: localhost
database: test
password: password
Any idea what i am doing wrong..these are the correct credentials because i conntect to this postgres db with a GUI tool with these creds
I used this link to install the pg gem
Given that you got an actual segmentation fault, I'd bet on a problem with your pg gem in conjunction with libpg. Did you by any chance upgrade your OS lately?
If this seems like a reasonable thing, you might try saving a backup of your database, nuking your existing pg installation (database, libraries and gems), then reinstalling it all in hopes of getting rid of whatever incompatibilities are causing the problem.
I have mysql and postgresql database in the same application. Here are the steps which i have followed to set up the postgresql database.
Install PostgreSQL and its libraries
sudo apt-get install postgresql postgresql-contrib libpq-dev
After the installation create a user for postgresql
sudo -u postgres createuser --superuser $USER
or
sudo -u postgres createuser pgs_root
Set user password for the postgresql user
sudo -u postgres psql postgres ( For psql prompt)
postgres=# \password <user>
for ex.- postgres=# \passsword pgs_root
Configure the postgresql.conf file to make PostgreSQL listen to localhost or listen on an external IP or something, change this line to either the IP or 'localhost'
gedit /etc/postgresql/8.4/main/postgresql.conf
listen_addresses = 'localhost'
In order for your application to connect with database present in PostgreSQL, configure it in the database.yml
development_postgres:
adapter: postgresql
database: connect_postgres
username: pgs_root
password: root123
host: 127.0.0.1
rake db:create RAILS_ENV=development_postgres
Like mysql query browser, there is a GUI for postgresql called pgadmin. To install
sudo apt-get install pgadmin3
I would try the following:
remove the host line
run bundle update
rename the database, just to make sure its fresh
run rake db:create
run rake db:migrate
I have had issues where my pg gem is not the right version for my version of rails
update all gems using Bundle Update command then run bundle exec rake db:migrate, It works for me.
best luck
I had the same problem and tried almost every solution on internet with no results.
But I finally found the solution.
The answer is to nuke (reinstall) everything.
That means:
resinstall PostgreSQL and its libraries (postgresql-9.1 postgresql-client postgresql-client-9.1 postgresql-client-common postgresql-common postgresql-contrib postgresql-contrib-9.1 postgresql-server-dev-9.1 libpgsql-ruby libpq-dev etc)
delete totally and create Ruby gemsets (the one which is bugged)
Reinstall Ruby eg. rvm reinstall 1.9.3 (this is very important, without that step it wont work)
If you have obsolete libraries (libpgsql-ruby1.8 etc) delete them.
PS This problem appeared in my machine when I upgrade Debian (from Squeeze to Wheezy).
Edit:
More explanation for this error:
https://bitbucket.org/ged/ruby-pg/issue/76/segfault-on-ruby-18-and-ruby-19-using#comment-590323
sometimes it is caused by a clash between multiple libssl versions
try that:
apt-get remove libssl0.9.8
rvm reinstall default
I'm trying to use the new Sidekiq gem in my rails application but when I run sidekiq I get:
Booting sidekiq 0.5.1 with Redis at redis://localhost:6379/0
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/task.rb:56: [BUG] Bus Error
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]
-- control frame ----------
c:0010 p:---- s:0034 b:0034 l:000033 d:000033 CFUNC :resume
c:0009 p:0018 s:0030 b:0030 l:000029 d:000029 METHOD /Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/task.rb:56
c:0008 p:0081 s:0025 b:0025 l:000c40 d:000c40 METHOD /Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/actor.rb:181
c:0007 p:0052 s:0021 b:0021 l:000020 d:000020 METHOD /Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/actor.rb:130
c:0006 p:0061 s:0015 b:0015 l:001db0 d:000014 BLOCK /Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/actor.rb:89
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :call
c:0003 p:0021 s:0008 b:0008 l:001f98 d:000007 BLOCK /Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/thread_pool.rb:46
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/thread_pool.rb:46:in `block in create'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/thread_pool.rb:46:in `call'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/actor.rb:89:in `block in initialize'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/actor.rb:130:in `run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/actor.rb:181:in `handle_message'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/task.rb:56:in `resume'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290#skateparks/gems/celluloid-0.8.0/lib/celluloid/task.rb:56:in `resume'
-- C level backtrace information -------------------------------------------
0 libruby.1.9.1.dylib 0x000000010834f51e rb_vm_bugreport + 110
1 libruby.1.9.1.dylib 0x0000000108243533 report_bug + 259
2 libruby.1.9.1.dylib 0x00000001082436a1 rb_bug + 161
3 libruby.1.9.1.dylib 0x00000001082e5fb2 sigbus + 18
4 libsystem_c.dylib 0x00007fff967d7cfa _sigtramp + 26
[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
[1] 1782 abort sidekiq
First, you should not be using 1.9.2 for this gem (1.9.3-p0 or higher) and second there is an open issue (GH-26) that references this error.