my integers have suddenly become negative numbers when returned from a .Net web service. Thing is I have this running locally on my Mac OS X box and everything is working fine. I then copied the exact same function to my (production) LIVE ubuntu web server and... Here''s the problem: I get a list of clients from a .Net web service to populate a HTML select box. I use the clients ID value as the value of the select box. On test this is working without any problems. The integers are the exact same IDs coming from the web service. They look something like this: 4108 I copied the same function to LIVE server which is running ubuntu Gutsy so perhaps the latest versions of RAILS/MONGREL etc and now the ID values look like this: -613465893 WEIRD!! Especially weird as it''s calling the same web service The ruby code hasn''t changed The RAW output from the webservice reveals that the values are indeed correct (4108) So something''s happening in Ruby/Rails thats having trouble with these ID values (but they''re just integers) And I''m pissed because I have few days to make this LIVE and it looks as if it might be a bug in RAILS/RUBY. Which means there''s probably not alot I can about it... Any help would be greatly appreciated..! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Compare the versions of Ruby. Your server may have a different version ( 1.8.4) instead of 1.8.6. How are you consuming the web service? What library are you using? On Nov 26, 2007 11:19 AM, Damian Mitchell <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > my integers have suddenly become negative numbers when returned from a > .Net web service. Thing is I have this running locally on my Mac OS X > box and everything is working fine. I then copied the exact same > function to my (production) LIVE ubuntu web server and... > > Here''s the problem: > > I get a list of clients from a .Net web service to populate a HTML > select box. > I use the clients ID value as the value of the select box. > On test this is working without any problems. The integers are the exact > same IDs coming from the web service. They look something like this: > 4108 > I copied the same function to LIVE server which is running ubuntu Gutsy > so perhaps the latest versions of RAILS/MONGREL etc and now the ID > values look like this: -613465893 > > WEIRD!! > > Especially weird as it''s calling the same web service > The ruby code hasn''t changed > The RAW output from the webservice reveals that the values are indeed > correct (4108) > > So something''s happening in Ruby/Rails thats having trouble with these > ID values (but they''re just integers) > > And I''m pissed because I have few days to make this LIVE and it looks as > if it might be a bug in RAILS/RUBY. Which means there''s probably not > alot I can about it... > > Any help would be greatly appreciated..! > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Also, wasn''t there some weird bug in 1.8.5 with numbers? (I like how specific that was, don''t you? :)) --Jeremy On Nov 26, 2007 1:16 PM, Brian Hogan <bphogan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Compare the versions of Ruby. Your server may have a different version > (1.8.4) instead of 1.8.6. > > How are you consuming the web service? What library are you using? > > > > On Nov 26, 2007 11:19 AM, Damian Mitchell <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > > > my integers have suddenly become negative numbers when returned from a > > .Net web service. Thing is I have this running locally on my Mac OS X > > box and everything is working fine. I then copied the exact same > > function to my (production) LIVE ubuntu web server and... > > > > Here''s the problem: > > > > I get a list of clients from a .Net web service to populate a HTML > > select box. > > I use the clients ID value as the value of the select box. > > On test this is working without any problems. The integers are the exact > > same IDs coming from the web service. They look something like this: > > 4108 > > I copied the same function to LIVE server which is running ubuntu Gutsy > > so perhaps the latest versions of RAILS/MONGREL etc and now the ID > > values look like this: -613465893 > > > > WEIRD!! > > > > Especially weird as it''s calling the same web service > > The ruby code hasn''t changed > > The RAW output from the webservice reveals that the values are indeed > > correct (4108) > > > > So something''s happening in Ruby/Rails thats having trouble with these > > ID values (but they''re just integers) > > > > And I''m pissed because I have few days to make this LIVE and it looks as > > if it might be a bug in RAILS/RUBY. Which means there''s probably not > > alot I can about it... > > > > Any help would be greatly appreciated..! > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > >-- http://www.jeremymcanally.com/ My books: Ruby in Practice http://www.manning.com/mcanally/ My free Ruby e-book http://www.humblelittlerubybook.com/ My blogs: http://www.mrneighborly.com/ http://www.rubyinpractice.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RAILS 1.2.5 RUBY 1.8.6 Same on both. The only difference appears to be the OS. My development machine is running Mac OS X and the web server is running a new install of Ubuntu Server 7.10 (Gutsy Gibbon) Here''s how i''m consuming the web service (bear in mind this is working perfect on development): require ''soap/wsdlDriver'' factory = SOAP::WSDLDriverFactory.new("mywebservice") soap = factory.create_rpc_driver clientslist = soap.GetClientsList(1) client = clientslist[''GetClientsListResult''] @clients = [] client.client.each do |clientobj| cl = ["#{clientobj.name}", "#{clientobj.id}"] @clients << cl end soap.reset_stream And so I pass @clients to the view and render a select box: <%= select("mediaitem", "mediaclient_id", @clients, {:selected => @mediaitem.mediaclient_id.to_s} ) %> Any help is much appreciated. thanks Damo Brian Hogan wrote:> Compare the versions of Ruby. Your server may have a different version > ( > 1.8.4) instead of 1.8.6. > > How are you consuming the web service? What library are you using? > > On Nov 26, 2007 11:19 AM, Damian Mitchell > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
What about the version of gems? Same versions? On Nov 27, 2007 3:38 AM, Damian Mitchell <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > RAILS 1.2.5 > RUBY 1.8.6 > > Same on both. The only difference appears to be the OS. My development > machine is running Mac OS X > and the web server is running a new install of Ubuntu Server 7.10 > (Gutsy Gibbon) > > Here''s how i''m consuming the web service (bear in mind this is working > perfect on development): > > require ''soap/wsdlDriver'' > > factory = SOAP::WSDLDriverFactory.new("mywebservice") > soap = factory.create_rpc_driver > clientslist = soap.GetClientsList(1) > client = clientslist[''GetClientsListResult''] > > @clients = [] > > client.client.each do |clientobj| > > cl = ["#{clientobj.name}", "#{clientobj.id}"] > > @clients << cl > > end > > soap.reset_stream > > And so I pass @clients to the view and render a select box: > > <%= select("mediaitem", "mediaclient_id", @clients, {:selected => > @mediaitem.mediaclient_id.to_s} ) %> > > > Any help is much appreciated. > > thanks > > Damo > > > > Brian Hogan wrote: > > Compare the versions of Ruby. Your server may have a different version > > ( > > 1.8.4) instead of 1.8.6. > > > > How are you consuming the web service? What library are you using? > > > > On Nov 26, 2007 11:19 AM, Damian Mitchell > > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
gem -v = 0.9.4 Brian Hogan wrote:> What about the version of gems? Same versions? > > On Nov 27, 2007 3:38 AM, Damian Mitchell > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
No, I meant the versions of the gems you are are using, like the SOAP one. Are those the same? gem list On Nov 27, 2007 9:45 AM, Damian Mitchell <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > gem -v = 0.9.4 > > Brian Hogan wrote: > > What about the version of gems? Same versions? > > > > On Nov 27, 2007 3:38 AM, Damian Mitchell > > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ah. Here you go: The SOAP is not a gem it appears to be built in. I simply require ''soap/wsdlDriver'' and it works (in development) rails 1.2.5 (same) I''ve kept my gem installs to a minimum. daemons, rmagick, mysql and that''s about it really. Everything else is out the box. I''ve also tried this with different ruby servers like mongrel and lighttpd. Both give the same results so I don''t think it''s a server issue. it''s really very odd and quite fustrating. i''m also new to ruby and rails and this is my first LIVE big production project. I had such high hopes for ruby and rails and really thought that deploying would be a trivial matter... To be fair it has been relatively painless until now. Brian Hogan wrote:> No, I meant the versions of the gems you are are using, like the SOAP > one. > Are those the same? > > gem list > > > > On Nov 27, 2007 9:45 AM, Damian Mitchell > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 27, 2007 11:15 AM, Damian Mitchell <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Ah. Here you go: > > The SOAP is not a gem it appears to be built in. I simply require > ''soap/wsdlDriver'' > and it works (in development) > > rails 1.2.5 (same) > > I''ve kept my gem installs to a minimum. daemons, rmagick, mysql and > that''s about it really. Everything > else is out the box. > I''ve also tried this with different ruby servers like mongrel and > lighttpd. Both give the same results so > I don''t think it''s a server issue. > > it''s really very odd and quite fustrating. i''m also new to ruby and > rails and this is my first LIVE big production project. I had such high > hopes for ruby and rails and really thought that deploying would be a > trivial matter... > > To be fair it has been relatively painless until now. > > > Brian Hogan wrote: > > No, I meant the versions of the gems you are are using, like the SOAP > > one. > > Are those the same? > > > > gem list > > > > > > > > On Nov 27, 2007 9:45 AM, Damian Mitchell > > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > -- > Posted via http://www.ruby-forum.com/. > >Soap is built into the Ruby std lib, yes, but there is a soap4r gem that''s a bit more complete of an implementation. WARNING: Use soap4r 1.5.7 or lower, don''t use 1.5.8. Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason, care to go further into depth with this warning? maybe why...> WARNING: Use soap4r 1.5.7 or lower, don''t use 1.5.8. > > Jason >/Shawn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That''s fine but still doesn''t explain why moving from development to production, using the exact same code base and ruby/rails versions, converts the ID to a completely different value..! Same web service Same SOAP implementation completely different results for the ID field..! Shawn Anderson wrote:> Jason, care to go further into depth with this warning? maybe why... > > >> WARNING: Use soap4r 1.5.7 or lower, don''t use 1.5.8. >> >> Jason >> > > /Shawn-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Prove it''s not the server. Run your app in production mode on your Mac. If it acts the same, then it''s something on your server and not in Rails. :) On Nov 27, 2007 11:00 AM, Damian Mitchell <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > That''s fine but still doesn''t explain why moving from development to > production, using > the exact same code base and ruby/rails versions, converts the ID to a > completely different value..! > > Same web service > Same SOAP implementation > > > > completely different results for the ID field..! > > > > Shawn Anderson wrote: > > Jason, care to go further into depth with this warning? maybe why... > > > > > >> WARNING: Use soap4r 1.5.7 or lower, don''t use 1.5.8. > >> > >> Jason > >> > > > > /Shawn > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Have just finished doing this: A new install running in development mode on the LIVE server. So I am now running everything in dev mode on both my MAC and LINUX boxes. Alas still returns a negative number on LINUX box instead of the actual ID value which is present and correct when you output using debug the results from the web service. So something must be happening in ruby or rails when I try to access the value... Brian Hogan wrote:> Prove it''s not the server. Run your app in production mode on your Mac. > If > it acts the same, then it''s something on your server and not in Rails. > :) > > > > > > On Nov 27, 2007 11:00 AM, Damian Mitchell > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---