Bug #2577
closedRuby 1.9.2 Preview 1 Aborts when script/generate is used
Description
=begin
Hi, I'm seeing the following when issue when I attempt
$ ruby -v
ruby 1.9.2dev (2009-07-18 trunk 24186) [powerpc-darwin9.8.0]
darnoc-desktop:blog-3.0.0 conradwt$ script/generate scaffold post title:string body:text
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activemodel-3.0.pre/lib/active_model/validations.rb:124: [BUG] rb_add_method: unsupported method type (8)
ruby 1.9.2dev (2009-07-18 trunk 24186) [powerpc-darwin9.8.0]
-- control frame ----------
c:0038 p:0127 s:0099 b:0099 l:000604 d:000604 CLASS /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activemodel-3.0.pre/lib/active_model/validations.rb:124
c:0037 p:0011 s:0097 b:0097 l:000096 d:000096 CLASS /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activemodel-3.0.pre/lib/active_model/validations.rb:6
c:0036 p:0045 s:0095 b:0095 l:000094 d:000094 TOP /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activemodel-3.0.pre/lib/active_model/validations.rb:5
c:0035 p:---- s:0093 b:0093 l:000092 d:000092 FINISH
c:0034 p:0031 s:0091 b:0090 l:000089 d:000089 CLASS /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/validations.rb:20
c:0033 p:0027 s:0088 b:0088 l:000087 d:000087 CLASS /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/validations.rb:18
c:0032 p:0009 s:0086 b:0086 l:000085 d:000085 TOP /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/validations.rb:1
c:0031 p:---- s:0084 b:0084 l:000083 d:000083 FINISH
c:0030 p:0065 s:0082 b:0081 l:000073 d:000080 BLOCK /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/base.rb:2842
c:0029 p:---- s:0079 b:0079 l:000078 d:000078 FINISH
c:0028 p:---- s:0077 b:0077 l:000076 d:000076 CFUNC :class_eval
c:0027 p:0395 s:0074 b:0074 l:000073 d:000073 CLASS /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/base.rb:2837
c:0026 p:0189 s:0072 b:0072 l:000071 d:000071 TOP /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/base.rb:17
c:0025 p:---- s:0070 b:0070 l:000069 d:000069 FINISH
c:0024 p:0205 s:0068 b:0066 l:000065 d:000065 TOP /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record.rb:142
c:0023 p:---- s:0062 b:0062 l:000061 d:000061 FINISH
c:0022 p:---- s:0060 b:0060 l:000059 d:000059 CFUNC :require
c:0021 p:0011 s:0056 b:0056 l:000055 d:000055 TOP /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/railtie.rb:5
c:0020 p:---- s:0054 b:0054 l:000053 d:000053 FINISH
c:0019 p:---- s:0052 b:0052 l:000051 d:000051 CFUNC :require
c:0018 p:0021 s:0048 b:0048 l:000039 d:000047 BLOCK /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/railties-3.0.pre/lib/rails/all.rb:12
c:0017 p:---- s:0045 b:0045 l:000044 d:000044 FINISH
c:0016 p:---- s:0043 b:0043 l:000042 d:000042 CFUNC :each
c:0015 p:0034 s:0040 b:0040 l:000039 d:000039 TOP /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/railties-3.0.pre/lib/rails/all.rb:5
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :require
c:0012 p:0150 s:0032 b:0032 l:000031 d:000031 TOP /Users/conradwt/rails.dir/examples/blog-3.0.0/config/boot.rb:16
c:0011 p:---- s:0028 b:0028 l:000027 d:000027 FINISH
c:0010 p:---- s:0026 b:0026 l:000025 d:000025 CFUNC :require
c:0009 p:0026 s:0022 b:0022 l:000021 d:000021 TOP /Users/conradwt/rails.dir/examples/blog-3.0.0/config/application.rb:1
c:0008 p:---- s:0020 b:0020 l:000019 d:000019 FINISH
c:0007 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :require
c:0006 p:0026 s:0014 b:0014 l:000013 d:000013 TOP /Users/conradwt/rails.dir/examples/blog-3.0.0/config/environment.rb:2
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:0026 s:0006 b:0006 l:0012d4 d:0011e4 EVAL script/generate:2
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0012d4 d:0012d4 TOP
-- Ruby level backtrace information-----------------------------------------
script/generate:2:in <main>' script/generate:2:in
require'
/Users/conradwt/rails.dir/examples/blog-3.0.0/config/environment.rb:2:in <top (required)>' /Users/conradwt/rails.dir/examples/blog-3.0.0/config/environment.rb:2:in
require'
/Users/conradwt/rails.dir/examples/blog-3.0.0/config/application.rb:1:in <top (required)>' /Users/conradwt/rails.dir/examples/blog-3.0.0/config/application.rb:1:in
require'
/Users/conradwt/rails.dir/examples/blog-3.0.0/config/boot.rb:16:in <top (required)>' /Users/conradwt/rails.dir/examples/blog-3.0.0/config/boot.rb:16:in
require'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/railties-3.0.pre/lib/rails/all.rb:5:in <top (required)>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/railties-3.0.pre/lib/rails/all.rb:5:in
each'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/railties-3.0.pre/lib/rails/all.rb:12:in block in <top (required)>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/railties-3.0.pre/lib/rails/all.rb:12:in
require'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/railtie.rb:5:in <top (required)>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/railtie.rb:5:in
require'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record.rb:142:in <top (required)>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/base.rb:17:in
<top (required)>'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/base.rb:2837:in <module:ActiveRecord>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/base.rb:2837:in
class_eval'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/base.rb:2842:in block in <module:ActiveRecord>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/validations.rb:1:in
<top (required)>'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/validations.rb:18:in <module:ActiveRecord>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activerecord-3.0.pre/lib/active_record/validations.rb:20:in
module:Validations'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activemodel-3.0.pre/lib/active_model/validations.rb:5:in <top (required)>' /Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activemodel-3.0.pre/lib/active_model/validations.rb:6:in
module:ActiveModel'
/Users/conradwt/.rvm/gems/ruby-1.9.2-preview1/gems/activemodel-3.0.pre/lib/active_model/validations.rb:124:in `module:Validations'
-- C level backtrace information -------------------------------------------
0 libruby.1.9.1.dylib 0x0038d118 rb_vm_bugreport + 264
1 libruby.1.9.1.dylib 0x002696fc rb_compile_warn + 444
2 libruby.1.9.1.dylib 0x002697c8 rb_bug + 88
3 libruby.1.9.1.dylib 0x0038a324 rb_alias + 548
4 libruby.1.9.1.dylib 0x0038a45c rb_alias + 860
5 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
6 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
7 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
8 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
9 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
10 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
11 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
12 libruby.1.9.1.dylib 0x0035bc84 rb_autoload_load + 148
13 libruby.1.9.1.dylib 0x0035bd10 rb_autoload_load + 288
14 libruby.1.9.1.dylib 0x0037d420 rb_raise_method_missing + 5440
15 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
16 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
17 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
18 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
19 libruby.1.9.1.dylib 0x0035bc84 rb_autoload_load + 148
20 libruby.1.9.1.dylib 0x0037d2e4 rb_raise_method_missing + 5124
21 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
22 libruby.1.9.1.dylib 0x00387af8 rb_yield + 2888
23 libruby.1.9.1.dylib 0x00387d40 rb_mod_module_exec + 176
24 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
25 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
26 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
27 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
28 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
29 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
30 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
31 libruby.1.9.1.dylib 0x0035bc84 rb_autoload_load + 148
32 libruby.1.9.1.dylib 0x0035bd10 rb_autoload_load + 288
33 libruby.1.9.1.dylib 0x0037d420 rb_raise_method_missing + 5440
34 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
35 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
36 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
37 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
38 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
39 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
40 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
41 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
42 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
43 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
44 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
45 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
46 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
47 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
48 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
49 libruby.1.9.1.dylib 0x003873d4 rb_yield + 1060
50 libruby.1.9.1.dylib 0x00234374 rb_ary_each + 116
51 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
52 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
53 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
54 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
55 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
56 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
57 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
58 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
59 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
60 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
61 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
62 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
63 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
64 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
65 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
66 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
67 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
68 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
69 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
70 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
71 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
72 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
73 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
74 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
75 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
76 libruby.1.9.1.dylib 0x00384a34 rb_iseq_eval + 372
77 libruby.1.9.1.dylib 0x0026ebe4 rb_get_load_path + 964
78 libruby.1.9.1.dylib 0x0026ff50 rb_require_safe + 1360
79 libruby.1.9.1.dylib 0x00377e88 rb_thread_alloc + 744
80 libruby.1.9.1.dylib 0x0037c210 rb_raise_method_missing + 816
81 libruby.1.9.1.dylib 0x0037f838 rb_raise_method_missing + 14680
82 libruby.1.9.1.dylib 0x0038419c rb_raise_method_missing + 33468
83 libruby.1.9.1.dylib 0x003848a8 rb_iseq_eval_main + 520
84 libruby.1.9.1.dylib 0x0026b1bc ruby_exec_node + 156
85 libruby.1.9.1.dylib 0x0026e088 ruby_run_node + 72
86 ruby 0x00001f78 main + 88
87 ruby 0x00001ec4 start + 68
88 ruby 0x00001000 _mh_execute_header + 0
[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
=end
Updated by luislavena (Luis Lavena) almost 15 years ago
=begin
Hello,
Lot of things happened since preview1.
Also, a smaller, reproducible case is better than attempt to reproduce in a full fledged Rails application where many loaded components can interfere.
I suggest you use something like RVM (http://rvm.beginrescueend.com/) and install 1.9 head, which will be the latest checkout of 1.9.2dev.
Using those, attempt to reproduce the error and let us know.
Cheers.
=end
Updated by naruse (Yui NARUSE) almost 15 years ago
- Status changed from Open to Feedback
- Assignee deleted (
ko1 (Koichi Sasada)) - Priority changed from 5 to 3
=begin
=end
Updated by libc (Eugene Pimenov) almost 15 years ago
=begin
It's a duplicate of #2051.
Line 124 of lib/active_model/validations.rb is
alias :read_attribute_for_validation :send
(http://github.com/rails/rails/blob/master/activemodel/lib/active_model/validations.rb#L124)
=end
Updated by mame (Yusuke Endoh) over 14 years ago
- Status changed from Feedback to Closed
=begin
Hi,
According to Eugene, this ticket is duplicate of #2051.
And, that ticket is already closed.
So I believe this issue is also perhaps fixed.
--
Yusuke Endoh mame@tsg.ne.jp
=end