Hi all, I got the following error message when booting up my app (which works fine with Rails 3.0.0.beta4) in Rails 3.0.0.rc; activesupport-3.0.0.rc/lib/active_support/file_update_checker.rb:27:in `stat'': can''t convert Array into String (TypeError) When I put some debug code on that line I see the follwing array being passed; ["/Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/ lib/active_support/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7- p299/gems/activemodel-3.0.0.rc/lib/active_model/locale/en.yml", "/ Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activerecord-3.0.0.rc/lib/ active_record/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7-p299/ gems/actionpack-3.0.0.rc/lib/action_view/locale/en.yml", ["/werkmap/ projects/skylight/twizzi2/config/locales/en.yml", "/werkmap/projects/ skylight/twizzi2/config/locales/fr.yml", "/werkmap/projects/skylight/ twizzi2/config/locales/nl.yml"], "/werkmap/projects/skylight/twizzi2/ config/locales/en.yml", "/werkmap/projects/skylight/twizzi2/config/ locales/fr.yml", "/werkmap/projects/skylight/twizzi2/config/locales/ nl.yml"] If you look good, you see that my locales files (in the middle of the main array) are in a new array. This middle-array is being passed into File.stat which can''t handle arrays. So when I change line 25 in file_update_checker from; paths.map { |path| File.stat(path).mtime }.max to paths.flatten.uniq.map { |path| File.stat(path).mtime }.max All seems to work fine, however I don''t know wheter that''s a good fix or not. I''m currently using rvm with ruby-1.8.7-p299. Can someone verify this problem before I turn it into a ticket? Thanks! Stijn -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Ok, just some more info... I tried to do the same with a clean app and that gave no problems. So I start disabling features in my current app untill I didn''t get the error. It turns out that the i18n_routing plugin causes the problem. It translate the current routes into various locales and seems to call that method before the paths are flatten out. Still not sure wether this is a plugin or a core issue. Please advise. Thanks, Stijn On Jul 28, 10:26 am, Stijnster <s.mathy...@telenet.be> wrote:> Hi all, > > I got the following error message when booting up my app (which works > fine with Rails 3.0.0.beta4) in Rails 3.0.0.rc; > > activesupport-3.0.0.rc/lib/active_support/file_update_checker.rb:27:in > `stat'': can''t convert Array into String (TypeError) > > When I put some debug code on that line I see the follwing array being > passed; > > ["/Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/ > lib/active_support/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7- > p299/gems/activemodel-3.0.0.rc/lib/active_model/locale/en.yml", "/ > Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activerecord-3.0.0.rc/lib/ > active_record/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7-p299/ > gems/actionpack-3.0.0.rc/lib/action_view/locale/en.yml", ["/werkmap/ > projects/skylight/twizzi2/config/locales/en.yml", "/werkmap/projects/ > skylight/twizzi2/config/locales/fr.yml", "/werkmap/projects/skylight/ > twizzi2/config/locales/nl.yml"], "/werkmap/projects/skylight/twizzi2/ > config/locales/en.yml", "/werkmap/projects/skylight/twizzi2/config/ > locales/fr.yml", "/werkmap/projects/skylight/twizzi2/config/locales/ > nl.yml"] > > If you look good, you see that my locales files (in the middle of the > main array) are in a new array. > > This middle-array is being passed into File.stat which can''t handle > arrays. So when I change line 25 in file_update_checker from; > > paths.map { |path| File.stat(path).mtime }.max > > to > > paths.flatten.uniq.map { |path| File.stat(path).mtime }.max > > All seems to work fine, however I don''t know wheter that''s a good fix > or not. > > I''m currently using rvm with ruby-1.8.7-p299. > > Can someone verify this problem before I turn it into a ticket? > > Thanks! > > Stijn-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
If it''s the plugin doing it then it''s the plugin''s fault. No? On 28 July 2010 19:13, Stijnster <s.mathysen@telenet.be> wrote:> Ok, just some more info... > > I tried to do the same with a clean app and that gave no problems. So > I start disabling features in my current app untill I didn''t get the > error. It turns out that the i18n_routing plugin causes the problem. > It translate the current routes into various locales and seems to call > that method before the paths are flatten out. > > Still not sure wether this is a plugin or a core issue. Please advise. > > Thanks, > > Stijn > > On Jul 28, 10:26 am, Stijnster <s.mathy...@telenet.be> wrote: > > Hi all, > > > > I got the following error message when booting up my app (which works > > fine with Rails 3.0.0.beta4) in Rails 3.0.0.rc; > > > > activesupport-3.0.0.rc/lib/active_support/file_update_checker.rb:27:in > > `stat'': can''t convert Array into String (TypeError) > > > > When I put some debug code on that line I see the follwing array being > > passed; > > > > ["/Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/ > > lib/active_support/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7- > > p299/gems/activemodel-3.0.0.rc/lib/active_model/locale/en.yml", "/ > > Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activerecord-3.0.0.rc/lib/ > > active_record/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7-p299/ > > gems/actionpack-3.0.0.rc/lib/action_view/locale/en.yml", ["/werkmap/ > > projects/skylight/twizzi2/config/locales/en.yml", "/werkmap/projects/ > > skylight/twizzi2/config/locales/fr.yml", "/werkmap/projects/skylight/ > > twizzi2/config/locales/nl.yml"], "/werkmap/projects/skylight/twizzi2/ > > config/locales/en.yml", "/werkmap/projects/skylight/twizzi2/config/ > > locales/fr.yml", "/werkmap/projects/skylight/twizzi2/config/locales/ > > nl.yml"] > > > > If you look good, you see that my locales files (in the middle of the > > main array) are in a new array. > > > > This middle-array is being passed into File.stat which can''t handle > > arrays. So when I change line 25 in file_update_checker from; > > > > paths.map { |path| File.stat(path).mtime }.max > > > > to > > > > paths.flatten.uniq.map { |path| File.stat(path).mtime }.max > > > > All seems to work fine, however I don''t know wheter that''s a good fix > > or not. > > > > I''m currently using rvm with ruby-1.8.7-p299. > > > > Can someone verify this problem before I turn it into a ticket? > > > > Thanks! > > > > Stijn > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >-- Ryan Bigg / Radar -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Yes, I guess so. I digged a little deeper in the plugin and it seems that the additional array is appended in the plugin code. I already notified the plugin developer. So I guess it''s case closed for Rails :-) Thanks anyway. Stijn On Jul 28, 11:29 am, Ryan Bigg <radarliste...@gmail.com> wrote:> If it''s the plugin doing it then it''s the plugin''s fault. > > No? > > On 28 July 2010 19:13, Stijnster <s.mathy...@telenet.be> wrote: > > > > > > > Ok, just some more info... > > > I tried to do the same with a clean app and that gave no problems. So > > I start disabling features in my current app untill I didn''t get the > > error. It turns out that the i18n_routing plugin causes the problem. > > It translate the current routes into various locales and seems to call > > that method before the paths are flatten out. > > > Still not sure wether this is a plugin or a core issue. Please advise. > > > Thanks, > > > Stijn > > > On Jul 28, 10:26 am, Stijnster <s.mathy...@telenet.be> wrote: > > > Hi all, > > > > I got the following error message when booting up my app (which works > > > fine with Rails 3.0.0.beta4) in Rails 3.0.0.rc; > > > > activesupport-3.0.0.rc/lib/active_support/file_update_checker.rb:27:in > > > `stat'': can''t convert Array into String (TypeError) > > > > When I put some debug code on that line I see the follwing array being > > > passed; > > > > ["/Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/ > > > lib/active_support/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7- > > > p299/gems/activemodel-3.0.0.rc/lib/active_model/locale/en.yml", "/ > > > Users/smath/.rvm/gems/ruby-1.8.7-p299/gems/activerecord-3.0.0.rc/lib/ > > > active_record/locale/en.yml", "/Users/smath/.rvm/gems/ruby-1.8.7-p299/ > > > gems/actionpack-3.0.0.rc/lib/action_view/locale/en.yml", ["/werkmap/ > > > projects/skylight/twizzi2/config/locales/en.yml", "/werkmap/projects/ > > > skylight/twizzi2/config/locales/fr.yml", "/werkmap/projects/skylight/ > > > twizzi2/config/locales/nl.yml"], "/werkmap/projects/skylight/twizzi2/ > > > config/locales/en.yml", "/werkmap/projects/skylight/twizzi2/config/ > > > locales/fr.yml", "/werkmap/projects/skylight/twizzi2/config/locales/ > > > nl.yml"] > > > > If you look good, you see that my locales files (in the middle of the > > > main array) are in a new array. > > > > This middle-array is being passed into File.stat which can''t handle > > > arrays. So when I change line 25 in file_update_checker from; > > > > paths.map { |path| File.stat(path).mtime }.max > > > > to > > > > paths.flatten.uniq.map { |path| File.stat(path).mtime }.max > > > > All seems to work fine, however I don''t know wheter that''s a good fix > > > or not. > > > > I''m currently using rvm with ruby-1.8.7-p299. > > > > Can someone verify this problem before I turn it into a ticket? > > > > Thanks! > > > > Stijn > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Core" group. > > To post to this group, send email to rubyonrails-core@googlegroups.com. > > To unsubscribe from this group, send email to > > rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscrib e@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-core?hl=en. > > -- > Ryan Bigg / Radar-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.