I''m going to deploy my Rails + MySQL app to customer''s fresh new Debian Linux. Since I''m not familiar with Debian please drop me hints about specifics, performance tuning, etc. Thanks, Gábor
Hi Guys, I''ve been lurking for a while, so here goes my first post... Rake prints the following error message when I try to run the unit tests for a library I''m building: NoMethodError: undefined method `get_fields'' for #<Net::HTTPOK 200 readbody=false> from /opt/local/lib/ruby/gems/1.8/gems/mechanize-0.2.2/lib/mechanize.rb:425:in `fetch_page'' from /opt/local/lib/ruby/gems/1.8/gems/mechanize-0.2.2/lib/mechanize.rb:422:in `request'' from /opt/local/lib/ruby/1.8/net/http.rb:835:in `reading_body'' from /opt/local/lib/ruby/1.8/net/http.rb:835:in `request'' from /opt/local/lib/ruby/gems/1.8/gems/mechanize-0.2.2/lib/mechanize.rb:422:in `fetch_page'' from /opt/local/lib/ruby/gems/1.8/gems/mechanize-0.2.2/lib/mechanize.rb:376:in `start'' from /opt/local/lib/ruby/gems/1.8/gems/mechanize-0.2.2/lib/mechanize.rb:376:in `fetch_page'' from /opt/local/lib/ruby/gems/1.8/gems/mechanize-0.2.2/lib/mechanize.rb:293:in `get'' After playing around with irb trying to replicate the problem, I discovered that the following code will work just fine (when executed from my Rails directory): require ''rubygems'' require ''mechanize'' mech = WWW::Mechanize.new mech.get(''http://thomas.loc.gov/cgi-bin/query/B?r109:@FIELD(FLD003+s)+@FIELD(DDATE+20050525)'') But the following will raise the exception every time (when executed from my Rails directory): require ''config/environment'' require ''mechanize'' mech = WWW::Mechanize.new mech.get(''http://thomas.loc.gov/cgi-bin/query/B?r109:@FIELD(FLD003+s)+@FIELD(DDATE+20050525)'') What is going on? It seems like something in the Rails environment is messing up WWW::Mechanize''s behavior, but that doesn''t make much sense. If anyone could shed some light on this issue, I would greatly appreciate the help. Thanks, -Bryan -- http://www.MyCongress.org/ -- coming soon
New to debian? Use aptitude to install applications. I have comments about installing ruby and rails at http://kellyfelkins.org/article/76/installing-ruby-and-rails-on-debian, which is a slight variation/enhancement to the howto at http://wiki.rubyonrails.com/rails/show/RailsOnUbuntuDebianTestingAndUnstable Debian is a great distro though its initial ruby packaging was flawed. That''s fixed now and things are working really well. Please reply to the group when you have more specific questions. -Kelly On 6/21/05, Gábor SEBESTYÉN <segabor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m going to deploy my Rails + MySQL app to customer''s fresh new > Debian Linux. > Since I''m not familiar with Debian please drop me hints about > specifics, performance tuning, etc. > Thanks, > > Gábor > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Duane Johnson
2005-Jun-24 03:10 UTC
Re: Rails environment changing WWW::Mechanize behavior
On Jun 21, 2005, at 11:55 PM, Bryan Helmkamp wrote:> What is going on? It seems like something in the Rails environment is > messing up WWW::Mechanize''s behavior, but that doesn''t make much > sense.I wonder what would happen if you try putting a ''require'' near the top of your environment.rb file? Maybe it wouldn''t get a chance to mess up the ruby include path (if indeed that''s what''s happening). Duane Johnson (canadaduane) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails