Hi, I am using gettext to let my web application know several languages. All works fine, but since I integrated it, my functional tests don''t work any more. I keep getting the error message: NoMethodError: undefined method `cgi'' for #<ActionController::TestRequest:0xb77f7f88>. All right, TestRequest doesn''t have a cgi method. Therefore I just included this into test_helper.rb: ActionController::TestRequest.send(:include, CGI::QueryExtension). Now the error message changes to: NameError: undefined local variable or method `env_table'' for #<ActionController::TestRequest:0xb7785848>. Great, but then there isn''t a module left (the cgi class is the only construct, which implements it), which I could use to include env_table; and I really don''t want to start cgi hacking... How should I solve this problem? Any help is greatly appreciated. Markus P.S.: Is this normal behaviour that the TestRequest class isn''t cgi capable? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060706/2749c0a5/attachment.html
Hi, What version of Ruby-GetText you use? 1.6.0 ? I''ve fixed similer problem once. But if you use 1.6.0, there has been another problem yet. And also tell me your environment detail. # show me the result of "ruby script/about". On Thu, 6 Jul 2006 15:44:10 +0200 "Markus Piff" <markus.piff@gmail.com> wrote:> Hi, > > I am using gettext to let my web application know several languages. All > works fine, but since I integrated it, my functional tests don''t work any > more. > I keep getting the error message: > NoMethodError: undefined method `cgi'' for > #<ActionController::TestRequest:0xb77f7f88>. > > All right, TestRequest doesn''t have a cgi method. Therefore I just included > this into test_helper.rb: > ActionController::TestRequest.send(:include, CGI::QueryExtension). > > Now the error message changes to: > NameError: undefined local variable or method `env_table'' for > #<ActionController::TestRequest:0xb7785848>. > > Great, but then there isn''t a module left (the cgi class is the only > construct, which implements it), which I could use to include env_table; and > I really don''t want to start cgi hacking... > > How should I solve this problem? > Any help is greatly appreciated. > > Markus > > P.S.: Is this normal behaviour that the TestRequest class isn''t cgi capable? >-- -- .:% Masao Mutoh<mutoh@highway.ne.jp>
On 7/6/06, Masao Mutoh <mutoh@highway.ne.jp> wrote:> Hi, > > What version of Ruby-GetText you use? > 1.6.0 ? > > I''ve fixed similer problem once. But if you > use 1.6.0, there has been another problem yet. > > And also tell me your environment detail. > # show me the result of "ruby script/about". > > > On Thu, 6 Jul 2006 15:44:10 +0200 > "Markus Piff" <markus.piff@gmail.com> wrote: > > > Hi, > > > > I am using gettext to let my web application know several languages. All > > works fine, but since I integrated it, my functional tests don''t work any > > more. > > I keep getting the error message: > > NoMethodError: undefined method `cgi'' for > > #<ActionController::TestRequest:0xb77f7f88>. > > > > All right, TestRequest doesn''t have a cgi method. Therefore I just included > > this into test_helper.rb: > > ActionController::TestRequest.send(:include, CGI::QueryExtension). > > > > Now the error message changes to: > > NameError: undefined local variable or method `env_table'' for > > #<ActionController::TestRequest:0xb7785848>. > > > > Great, but then there isn''t a module left (the cgi class is the only > > construct, which implements it), which I could use to include env_table; and > > I really don''t want to start cgi hacking... > > > > How should I solve this problem? > > Any help is greatly appreciated. > > > > Markus > > > > P.S.: Is this normal behaviour that the TestRequest class isn''t cgi capable? > >Do you have the same problems with Integration tests? Functional and Integration tests share mostly the same structure so it would be easy to test but I find that there are things in the functional tests that are missing that are present in the Integration tests. Cheers, Chuck Vose
Hi, first of all thank you for your response. @Chuck: Since I am using rails 1.0, integration tests will all go fine, because there are none in rails 1.0 ;-). @Masao: I was using ruby-gettext 1.0, but after your email I tried all kinds of versions. All result to the same error. What''s a good and stable version of gettext anyway? Here is the output of ruby script/about: About your application''s environment Ruby version 1.8.4 (i486-linux) RubyGems version 0.8.11 Rails version 1.0.0 Active Record version 1.13.2 Action Pack version 1.11.2 Action Web Service version 1.0.0 Action Mailer version 1.1.5 Active Support version 1.2.5 Application root /home/markus/workspace/jobs Environment development Database adapter mysql Any ideas left? I really appreciate your help, I am already getting somewhat desperate :-) . Markus On 7/6/06, Chuck Vose <vosechu@create-on.com> wrote:> > On 7/6/06, Masao Mutoh <mutoh@highway.ne.jp> wrote: > > Hi, > > > > What version of Ruby-GetText you use? > > 1.6.0 ? > > > > I''ve fixed similer problem once. But if you > > use 1.6.0, there has been another problem yet. > > > > And also tell me your environment detail. > > # show me the result of "ruby script/about". > > > > > > On Thu, 6 Jul 2006 15:44:10 +0200 > > "Markus Piff" <markus.piff@gmail.com> wrote: > > > > > Hi, > > > > > > I am using gettext to let my web application know several languages. > All > > > works fine, but since I integrated it, my functional tests don''t work > any > > > more. > > > I keep getting the error message: > > > NoMethodError: undefined method `cgi'' for > > > #<ActionController::TestRequest:0xb77f7f88>. > > > > > > All right, TestRequest doesn''t have a cgi method. Therefore I just > included > > > this into test_helper.rb: > > > ActionController::TestRequest.send(:include, CGI::QueryExtension). > > > > > > Now the error message changes to: > > > NameError: undefined local variable or method `env_table'' for > > > #<ActionController::TestRequest:0xb7785848>. > > > > > > Great, but then there isn''t a module left (the cgi class is the only > > > construct, which implements it), which I could use to include > env_table; and > > > I really don''t want to start cgi hacking... > > > > > > How should I solve this problem? > > > Any help is greatly appreciated. > > > > > > Markus > > > > > > P.S.: Is this normal behaviour that the TestRequest class isn''t cgi > capable? > > > > > Do you have the same problems with Integration tests? Functional and > Integration tests share mostly the same structure so it would be easy > to test but I find that there are things in the functional tests that > are missing that are present in the Integration tests. > > Cheers, > Chuck Vose > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060706/4df6527b/attachment.html
Hi, just to complete this. I finally found a solution, which even seems a bit silly; but hey it works :-). I just had to include the following to test_helper.rb: class ActionController::TestRequest; def cgi() end; end Thanks again for helping, Markus On 7/6/06, Markus Piff <markus.piff@gmail.com> wrote:> > Hi, > > first of all thank you for your response. > @Chuck: Since I am using rails 1.0, integration tests will all go fine, > because there are none in rails 1.0 ;-). > > @Masao: I was using ruby-gettext 1.0, but after your email I tried all > kinds of versions. All result to the same error. What''s a good and stable > version of gettext anyway? > > Here is the output of ruby script/about: > About your application''s environment > Ruby version 1.8.4 (i486-linux) > RubyGems version 0.8.11 > Rails version 1.0.0 > Active Record version 1.13.2 > Action Pack version 1.11.2 > Action Web Service version 1.0.0 > Action Mailer version 1.1.5 > Active Support version 1.2.5 > Application root /home/markus/workspace/jobs > Environment development > Database adapter mysql > > Any ideas left? > I really appreciate your help, I am already getting somewhat desperate :-) > . > > Markus > > > On 7/6/06, Chuck Vose <vosechu@create-on.com> wrote: > > > > On 7/6/06, Masao Mutoh <mutoh@highway.ne.jp> wrote: > > > Hi, > > > > > > What version of Ruby-GetText you use? > > > 1.6.0 ? > > > > > > I''ve fixed similer problem once. But if you > > > use 1.6.0, there has been another problem yet. > > > > > > And also tell me your environment detail. > > > # show me the result of "ruby script/about". > > > > > > > > > On Thu, 6 Jul 2006 15:44:10 +0200 > > > "Markus Piff" <markus.piff@gmail.com> wrote: > > > > > > > Hi, > > > > > > > > I am using gettext to let my web application know several languages. > > All > > > > works fine, but since I integrated it, my functional tests don''t > > work any > > > > more. > > > > I keep getting the error message: > > > > NoMethodError: undefined method `cgi'' for > > > > #<ActionController::TestRequest:0xb77f7f88>. > > > > > > > > All right, TestRequest doesn''t have a cgi method. Therefore I just > > included > > > > this into test_helper.rb: > > > > ActionController::TestRequest.send(:include, CGI::QueryExtension). > > > > > > > > Now the error message changes to: > > > > NameError: undefined local variable or method `env_table'' for > > > > #<ActionController::TestRequest:0xb7785848>. > > > > > > > > Great, but then there isn''t a module left (the cgi class is the only > > > > > > construct, which implements it), which I could use to include > > env_table; and > > > > I really don''t want to start cgi hacking... > > > > > > > > How should I solve this problem? > > > > Any help is greatly appreciated. > > > > > > > > Markus > > > > > > > > P.S.: Is this normal behaviour that the TestRequest class isn''t cgi > > capable? > > > > > > > > Do you have the same problems with Integration tests? Functional and > > Integration tests share mostly the same structure so it would be easy > > to test but I find that there are things in the functional tests that > > are missing that are present in the Integration tests. > > > > Cheers, > > Chuck Vose > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/8f09cef3/attachment.html
Hi, On Thu, 13 Jul 2006 17:52:28 +0200 "Markus Piff" <markus.piff@gmail.com> wrote:> Hi, > just to complete this. > I finally found a solution, which even seems a bit silly; but hey it works > :-). > > I just had to include the following to test_helper.rb: > > class ActionController::TestRequest; def cgi() end; endHmm. Strange. There is the same code in gettext/rails.rb (Since 1.5.0) . Did you "require ''gettext/rails''" anywhere ?> Thanks again for helping, > Markus > > On 7/6/06, Markus Piff <markus.piff@gmail.com> wrote: > > > > Hi, > > > > first of all thank you for your response. > > @Chuck: Since I am using rails 1.0, integration tests will all go fine, > > because there are none in rails 1.0 ;-). > > > > @Masao: I was using ruby-gettext 1.0, but after your email I tried all > > kinds of versions. All result to the same error. What''s a good and stable > > version of gettext anyway? > > > > Here is the output of ruby script/about: > > About your application''s environment > > Ruby version 1.8.4 (i486-linux) > > RubyGems version 0.8.11 > > Rails version 1.0.0 > > Active Record version 1.13.2 > > Action Pack version 1.11.2 > > Action Web Service version 1.0.0 > > Action Mailer version 1.1.5 > > Active Support version 1.2.5 > > Application root /home/markus/workspace/jobs > > Environment development > > Database adapter mysql > > > > Any ideas left? > > I really appreciate your help, I am already getting somewhat desperate :-) > > . > > > > Markus > > > > > > On 7/6/06, Chuck Vose <vosechu@create-on.com> wrote: > > > > > > On 7/6/06, Masao Mutoh <mutoh@highway.ne.jp> wrote: > > > > Hi, > > > > > > > > What version of Ruby-GetText you use? > > > > 1.6.0 ? > > > > > > > > I''ve fixed similer problem once. But if you > > > > use 1.6.0, there has been another problem yet. > > > > > > > > And also tell me your environment detail. > > > > # show me the result of "ruby script/about". > > > > > > > > > > > > On Thu, 6 Jul 2006 15:44:10 +0200 > > > > "Markus Piff" <markus.piff@gmail.com> wrote: > > > > > > > > > Hi, > > > > > > > > > > I am using gettext to let my web application know several languages. > > > All > > > > > works fine, but since I integrated it, my functional tests don''t > > > work any > > > > > more. > > > > > I keep getting the error message: > > > > > NoMethodError: undefined method `cgi'' for > > > > > #<ActionController::TestRequest:0xb77f7f88>. > > > > > > > > > > All right, TestRequest doesn''t have a cgi method. Therefore I just > > > included > > > > > this into test_helper.rb: > > > > > ActionController::TestRequest.send(:include, CGI::QueryExtension). > > > > > > > > > > Now the error message changes to: > > > > > NameError: undefined local variable or method `env_table'' for > > > > > #<ActionController::TestRequest:0xb7785848>. > > > > > > > > > > Great, but then there isn''t a module left (the cgi class is the only > > > > > > > > construct, which implements it), which I could use to include > > > env_table; and > > > > > I really don''t want to start cgi hacking... > > > > > > > > > > How should I solve this problem? > > > > > Any help is greatly appreciated. > > > > > > > > > > Markus > > > > > > > > > > P.S.: Is this normal behaviour that the TestRequest class isn''t cgi > > > capable? > > > > > > > > > > > Do you have the same problems with Integration tests? Functional and > > > Integration tests share mostly the same structure so it would be easy > > > to test but I find that there are things in the functional tests that > > > are missing that are present in the Integration tests. > > > > > > Cheers, > > > Chuck Vose > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > >-- -- .:% Masao Mutoh<mutoh@highway.ne.jp>
Hi! In rgettext 1.0 there is no such code. And as I already told you before, I tried all kinds of rgettext versions (all installed with gem) but all resulted to the same error. Of course I had a require "gettext/rails" included; otherwise other errors would have shown up. Anyways the thing works now :-) Markus On 7/13/06, Masao Mutoh <mutoh@highway.ne.jp> wrote:> > Hi, > > On Thu, 13 Jul 2006 17:52:28 +0200 > "Markus Piff" <markus.piff@gmail.com> wrote: > > > Hi, > > just to complete this. > > I finally found a solution, which even seems a bit silly; but hey it > works > > :-). > > > > I just had to include the following to test_helper.rb: > > > > class ActionController::TestRequest; def cgi() end; end > > Hmm. Strange. > There is the same code in gettext/rails.rb (Since 1.5.0) . > Did you "require ''gettext/rails''" anywhere ? > > > Thanks again for helping, > > Markus > > > > On 7/6/06, Markus Piff <markus.piff@gmail.com> wrote: > > > > > > Hi, > > > > > > first of all thank you for your response. > > > @Chuck: Since I am using rails 1.0, integration tests will all go > fine, > > > because there are none in rails 1.0 ;-). > > > > > > @Masao: I was using ruby-gettext 1.0, but after your email I tried all > > > kinds of versions. All result to the same error. What''s a good and > stable > > > version of gettext anyway? > > > > > > Here is the output of ruby script/about: > > > About your application''s environment > > > Ruby version 1.8.4 (i486-linux) > > > RubyGems version 0.8.11 > > > Rails version 1.0.0 > > > Active Record version 1.13.2 > > > Action Pack version 1.11.2 > > > Action Web Service version 1.0.0 > > > Action Mailer version 1.1.5 > > > Active Support version 1.2.5 > > > Application root /home/markus/workspace/jobs > > > Environment development > > > Database adapter mysql > > > > > > Any ideas left? > > > I really appreciate your help, I am already getting somewhat desperate > :-) > > > . > > > > > > Markus > > > > > > > > > On 7/6/06, Chuck Vose <vosechu@create-on.com> wrote: > > > > > > > > On 7/6/06, Masao Mutoh <mutoh@highway.ne.jp> wrote: > > > > > Hi, > > > > > > > > > > What version of Ruby-GetText you use? > > > > > 1.6.0 ? > > > > > > > > > > I''ve fixed similer problem once. But if you > > > > > use 1.6.0, there has been another problem yet. > > > > > > > > > > And also tell me your environment detail. > > > > > # show me the result of "ruby script/about". > > > > > > > > > > > > > > > On Thu, 6 Jul 2006 15:44:10 +0200 > > > > > "Markus Piff" <markus.piff@gmail.com> wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I am using gettext to let my web application know several > languages. > > > > All > > > > > > works fine, but since I integrated it, my functional tests don''t > > > > work any > > > > > > more. > > > > > > I keep getting the error message: > > > > > > NoMethodError: undefined method `cgi'' for > > > > > > #<ActionController::TestRequest:0xb77f7f88>. > > > > > > > > > > > > All right, TestRequest doesn''t have a cgi method. Therefore I > just > > > > included > > > > > > this into test_helper.rb: > > > > > > ActionController::TestRequest.send(:include, > CGI::QueryExtension). > > > > > > > > > > > > Now the error message changes to: > > > > > > NameError: undefined local variable or method `env_table'' for > > > > > > #<ActionController::TestRequest:0xb7785848>. > > > > > > > > > > > > Great, but then there isn''t a module left (the cgi class is the > only > > > > > > > > > > construct, which implements it), which I could use to include > > > > env_table; and > > > > > > I really don''t want to start cgi hacking... > > > > > > > > > > > > How should I solve this problem? > > > > > > Any help is greatly appreciated. > > > > > > > > > > > > Markus > > > > > > > > > > > > P.S.: Is this normal behaviour that the TestRequest class isn''t > cgi > > > > capable? > > > > > > > > > > > > > > Do you have the same problems with Integration tests? Functional and > > > > Integration tests share mostly the same structure so it would be > easy > > > > to test but I find that there are things in the functional tests > that > > > > are missing that are present in the Integration tests. > > > > > > > > Cheers, > > > > Chuck Vose > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > -- > -- > .:% Masao Mutoh<mutoh@highway.ne.jp> > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060715/0a86f60b/attachment-0001.html