I have a rails app that uses the salted login generator (1.0.9), and thus, the localization library (1.0.7). After upgrading to rails 0.13, attempting to start the server (whether webrick or lighttpd) results in the following crash: ./script/../config/..//lib/localization.rb:82:in `module_eval'': (eval):3:in `module_eval'': undefined method `render_body'' for class `Class'' (NameError) from ./script/../config/..//lib/localization.rb:82:in `module_eval'' from ./script/../config/..//lib/localization.rb:82 from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' from /home/fishbone/lib/ruby/gems/1.8/gems/activesupport-1.1.0/lib/active_support/dependencies.rb:200:in `require'' from ./script/../config/environment.rb:79 from script/server:42:in `require'' from script/server:42 The relevant section of localization.rb looks like this: module Localization ... # redefinition of ActionMail::Base#render_body, that adds locale suffix to # the template name #### The next line is line 82, as referenced by the error message. ActionMailer::Base.module_eval <<-EOL class << self private alias :render_body_old :render_body def render_body(mailer, method_name) ActionView::Base.new(template_path, mailer.body).render_file(method_name + "_#{CONFIG[:default_language]}") end end EOL end I am still becoming familiar with ruby, so I''m not exactly sure of the problem here. Has anyone else seen this with the salted login generator and 0.13? Thanks for any suggestions. - david
David, I know that there have been changes to ActionMailer in this release, so there could be some incompatibilities with the generator. I will take a look at any problems with 0.13 this weekend. If you can''t hold off until then, I would just suggest browsing the ActionMailer code to see what has changed pertinent to the method you had problems with. Joe On Jul 7, 2005, at 9:32 AM, David McGaffin wrote:> I have a rails app that uses the salted login generator (1.0.9), and > thus, the localization library (1.0.7). After upgrading to rails > 0.13, attempting to start the server (whether webrick or lighttpd) > results in the following crash: > > ./script/../config/..//lib/localization.rb:82:in `module_eval'': > (eval):3:in `module_eval'': undefined method `render_body'' for class > `Class'' (NameError) > from ./script/../config/..//lib/localization.rb:82:in > `module_eval'' > from ./script/../config/..//lib/localization.rb:82 > from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:18:in > `require__'' > from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:18:in > `require'' > from /home/fishbone/lib/ruby/gems/1.8/gems/ > activesupport-1.1.0/lib/active_support/dependencies.rb:200:in > `require'' > from ./script/../config/environment.rb:79 > from script/server:42:in `require'' > from script/server:42 > > The relevant section of localization.rb looks like this: > > module Localization > > ... > > # redefinition of ActionMail::Base#render_body, that adds locale > suffix to > # the template name > > #### The next line is line 82, as referenced by the error message. > ActionMailer::Base.module_eval <<-EOL > class << self > private > alias :render_body_old :render_body > def render_body(mailer, method_name) > ActionView::Base.new(template_path, > mailer.body).render_file(method_name + > "_#{CONFIG[:default_language]}") > end > end > EOL > end > > I am still becoming familiar with ruby, so I''m not exactly sure of the > problem here. Has anyone else seen this with the salted login > generator and 0.13? Thanks for any suggestions. > > - david > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Joseph Hosteny jhosteny-ee4meeAH724@public.gmane.org H: 412.362.8672 C: 412.418.6023
The fix is at the bottom of this wiki page: http://wiki.rubyonrails.com/rails/show/SaltedHashLoginGenerator There are other minor issues with .nil? for forms etc., but you''ll have to hit those as you encounter them. Matt On Jul 7, 2005, at 9:39 AM, Joseph Hosteny wrote:> David, > > I know that there have been changes to ActionMailer in this > release, so there could be some incompatibilities with the > generator. I will take a look at any problems with 0.13 this > weekend. If you can''t hold off until then, I would just suggest > browsing the ActionMailer code to see what has changed pertinent to > the method you had problems with. > > Joe > > On Jul 7, 2005, at 9:32 AM, David McGaffin wrote: > > >> I have a rails app that uses the salted login generator (1.0.9), and >> thus, the localization library (1.0.7). After upgrading to rails >> 0.13, attempting to start the server (whether webrick or lighttpd) >> results in the following crash: >> >> ./script/../config/..//lib/localization.rb:82:in `module_eval'': >> (eval):3:in `module_eval'': undefined method `render_body'' for class >> `Class'' (NameError) >> from ./script/../config/..//lib/localization.rb:82:in >> `module_eval'' >> from ./script/../config/..//lib/localization.rb:82 >> from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/ >> custom_require.rb:18:in >> `require__'' >> from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/ >> custom_require.rb:18:in >> `require'' >> from /home/fishbone/lib/ruby/gems/1.8/gems/ >> activesupport-1.1.0/lib/active_support/dependencies.rb:200:in >> `require'' >> from ./script/../config/environment.rb:79 >> from script/server:42:in `require'' >> from script/server:42 >> >> The relevant section of localization.rb looks like this: >> >> module Localization >> >> ... >> >> # redefinition of ActionMail::Base#render_body, that adds locale >> suffix to >> # the template name >> >> #### The next line is line 82, as referenced by the error message. >> ActionMailer::Base.module_eval <<-EOL >> class << self >> private >> alias :render_body_old :render_body >> def render_body(mailer, method_name) >> ActionView::Base.new(template_path, >> mailer.body).render_file(method_name + >> "_#{CONFIG[:default_language]}") >> end >> end >> EOL >> end >> >> I am still becoming familiar with ruby, so I''m not exactly sure of >> the >> problem here. Has anyone else seen this with the salted login >> generator and 0.13? Thanks for any suggestions. >> >> - david >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> > > Joseph Hosteny > jhosteny-ee4meeAH724@public.gmane.org > H: 412.362.8672 > C: 412.418.6023 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >Matt Pelletier pelletierm-A1PILTyJ15gXhy9q4Lf3Ug@public.gmane.org
Thanks, that did the trick. - david On 7/7/05, Matt Pelletier <pelletierm-A1PILTyJ15gXhy9q4Lf3Ug@public.gmane.org> wrote:> The fix is at the bottom of this wiki page: > > http://wiki.rubyonrails.com/rails/show/SaltedHashLoginGenerator > > There are other minor issues with .nil? for forms etc., but you''ll > have to hit those as you encounter them. > > Matt > > On Jul 7, 2005, at 9:39 AM, Joseph Hosteny wrote: > > > David, > > > > I know that there have been changes to ActionMailer in this > > release, so there could be some incompatibilities with the > > generator. I will take a look at any problems with 0.13 this > > weekend. If you can''t hold off until then, I would just suggest > > browsing the ActionMailer code to see what has changed pertinent to > > the method you had problems with. > > > > Joe > > > > On Jul 7, 2005, at 9:32 AM, David McGaffin wrote: > > > > > >> I have a rails app that uses the salted login generator (1.0.9), and > >> thus, the localization library (1.0.7). After upgrading to rails > >> 0.13, attempting to start the server (whether webrick or lighttpd) > >> results in the following crash: > >> > >> ./script/../config/..//lib/localization.rb:82:in `module_eval'': > >> (eval):3:in `module_eval'': undefined method `render_body'' for class > >> `Class'' (NameError) > >> from ./script/../config/..//lib/localization.rb:82:in > >> `module_eval'' > >> from ./script/../config/..//lib/localization.rb:82 > >> from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/ > >> custom_require.rb:18:in > >> `require__'' > >> from /home/fishbone/lib/ruby/site_ruby/1.8/rubygems/ > >> custom_require.rb:18:in > >> `require'' > >> from /home/fishbone/lib/ruby/gems/1.8/gems/ > >> activesupport-1.1.0/lib/active_support/dependencies.rb:200:in > >> `require'' > >> from ./script/../config/environment.rb:79 > >> from script/server:42:in `require'' > >> from script/server:42 > >> > >> The relevant section of localization.rb looks like this: > >> > >> module Localization > >> > >> ... > >> > >> # redefinition of ActionMail::Base#render_body, that adds locale > >> suffix to > >> # the template name > >> > >> #### The next line is line 82, as referenced by the error message. > >> ActionMailer::Base.module_eval <<-EOL > >> class << self > >> private > >> alias :render_body_old :render_body > >> def render_body(mailer, method_name) > >> ActionView::Base.new(template_path, > >> mailer.body).render_file(method_name + > >> "_#{CONFIG[:default_language]}") > >> end > >> end > >> EOL > >> end > >> > >> I am still becoming familiar with ruby, so I''m not exactly sure of > >> the > >> problem here. Has anyone else seen this with the salted login > >> generator and 0.13? Thanks for any suggestions. > >> > >> - david > >> _______________________________________________ > >> Rails mailing list > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > > > > Joseph Hosteny > > jhosteny-ee4meeAH724@public.gmane.org > > H: 412.362.8672 > > C: 412.418.6023 > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > Matt Pelletier > pelletierm-A1PILTyJ15gXhy9q4Lf3Ug@public.gmane.org > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >