Re: Time Parse Problem
Thanks will try both suggestions and let you know what comes of it. I actaully noticed the problem becuase my time column in one of my models was not getting saved. It kept being save as nil. Could the problem relate to different databases being used? On my local, I use sqlite vesus PostGre on Heroku. Really, all I am trying to do is using a javascrpt plugin to allow users to choose a time and date which comes in the form of day/month/year hour:minute am/pm and then save it to the db. It seems strange non one else has come accross this... make me think it is something specific to what I am doing. Will keep you posted. On Feb 15, 12:22 am, Tom O'Neill vay...@gmail.com wrote: If you know the format of the string you want to parse, strptime is a good option: DateTime.strptime(dateWithTz, '%m/%d/%Y %z') Tom -Original Message- From: heroku@googlegroups.com [mailto:heroku@googlegroups.com] On Behalf Of kowsik Sent: Tuesday, February 14, 2012 8:30 PM To: heroku@googlegroups.com Subject: Re: Time Parse Problem You should do 'bundle exec irb' locally and then require the gems (specific versions) declared in your Gemfile. Is it possible that you have newer gems locally that are affecting the time? We recently added a campfire gem to our Sinatra app that started using something other than json/ext which ended up changing our time formats when serialized to JSON. Took a while to track down. K. ---http://blitz.io @k1sw0k On Tue, Feb 14, 2012 at 8:13 PM, tashfeen.ekram tashfeen.ek...@gmail.com wrote: It seems like the Time.parse function behaves differently on my local machine versus on Heroku. When given the date of 2/14/2012, my local machine assumes month/day/ year and parses it just fine. However, Heroku assumes day/month/year. So, when it is give to parse 2/14/2012 it gives me out of range error. The outputs are below. Any idea why it does this? It is disrupting my time values... Heroku Console Output: Time.zone = (GMT+00:00) UTC Time.zone.parse(02/14/2012 03:00 am) ArgumentError: invalid date /usr/ruby1.9.2/lib/ruby/1.9.1/date.rb:1688:in `new_by_frags' /usr/ruby1.9.2/lib/ruby/1.9.1/date.rb:1733:in `parse' /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.3/lib/ active_support/values/time_zone.rb:271:in `rescue in parse' /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.3/lib/ active_support/values/time_zone.rb:271:in `parse' Time.zone.parse(02/12/2012 03:00 am) = Sun, 02 Dec 2012 03:00:00 UTC +00:00 My Workstation Output: irb(main):008:0 Time.zone = #ActiveSupport::TimeZone:0xb6bfdc5c @tzinfo=#TZInfo::TimezoneProxy: Etc/UTC, @utc_offset=nil, @current_period=nil, @name=UTC irb(main):009:0 Time.zone.parse(02/14/2012 03:00 am) = Tue, 14 Feb 2012 03:00:00 UTC +00:00 irb(main):010:0 Time.zone.parse(02/12/2012 03:00 am) = Sun, 12 Feb 2012 03:00:00 UTC +00:00 -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/heroku?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Time Parse Problem
It seems like the Time.parse function behaves differently on my local machine versus on Heroku. When given the date of 2/14/2012, my local machine assumes month/day/ year and parses it just fine. However, Heroku assumes day/month/year. So, when it is give to parse 2/14/2012 it gives me out of range error. The outputs are below. Any idea why it does this? It is disrupting my time values... Heroku Console Output: Time.zone = (GMT+00:00) UTC Time.zone.parse(02/14/2012 03:00 am) ArgumentError: invalid date /usr/ruby1.9.2/lib/ruby/1.9.1/date.rb:1688:in `new_by_frags' /usr/ruby1.9.2/lib/ruby/1.9.1/date.rb:1733:in `parse' /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.3/lib/ active_support/values/time_zone.rb:271:in `rescue in parse' /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.3/lib/ active_support/values/time_zone.rb:271:in `parse' Time.zone.parse(02/12/2012 03:00 am) = Sun, 02 Dec 2012 03:00:00 UTC +00:00 My Workstation Output: irb(main):008:0 Time.zone = #ActiveSupport::TimeZone:0xb6bfdc5c @tzinfo=#TZInfo::TimezoneProxy: Etc/UTC, @utc_offset=nil, @current_period=nil, @name=UTC irb(main):009:0 Time.zone.parse(02/14/2012 03:00 am) = Tue, 14 Feb 2012 03:00:00 UTC +00:00 irb(main):010:0 Time.zone.parse(02/12/2012 03:00 am) = Sun, 12 Feb 2012 03:00:00 UTC +00:00 -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
App Failed to start - Missing gem?
I just try to push my app to heroku that runs fine locally in development and productin mode. I am getting th app failed to load error. I have pasted the trace below. I am confused at what the exact error is. It seems like it may be originating in the enviroment file however when i look tehre there is no problemd around the line it is indicating. It almost looks like th git conflict error on gets ?? /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /disk1/home/slugs/181977_8a89447_8abf/mnt/ config/environment.rb:37: syntax error, unexpected tLSHFT, expecting kEND (SyntaxError) HEAD:config/environment.rb ^ /disk1/home/slugs/181977_8a89447_8abf/mnt/config/environment.rb:38: syntax error, unexpected tEQQ, expecting kEND === ^ /disk1/home/slugs/181977_8a89447_8abf/mnt/config/environment.rb:41: syntax error, unexpected tRSHFT, expecting kEND 18783b1224a1e9dda9a62294cbcca42216201356:config/environment.rb ^ from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31:in `require' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:31:in `load_application' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/ rails.rb:23:in `initialize' from /home/heroku_rack/heroku.ru:27:in `new' from /home/heroku_rack/heroku.ru:27 from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 29:in `instance_eval' from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 29:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 46:in `new' ... 6 levels... from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 29:in `instance_eval' from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb: 29:in `initialize' from /home/heroku_rack/heroku.ru:1:in `new' from /home/heroku_rack/heroku.ru:1 -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Sphinx support
It states on the keroku docs pages to use ferret or solr for our search needs. Is there any hope of getting sphinx support? (Not a big fan of java and was hoping of not incurring another cost by running a seperate service on ec2.) Thanks, Tashfeen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~--~~~~--~~--~--~---
Uploading Data in Herokugarden
I have uploaded my data.yml file into the db file. I open up the rake console window and try to load the data. It begins but it times out and gives me the error of refresh failed. The data then is not loaded. This is on herokugarden. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~--~~~~--~~--~--~---
Re: Uploading Data in Herokugarden
could there be a size limitation? the file is 27 mgs. On Jul 6, 11:09 am, tashfeen.ekram tashfeen.ek...@gmail.com wrote: I have uploaded my data.yml file into the db file. I open up the rake console window and try to load the data. It begins but it times out and gives me the error of refresh failed. The data then is not loaded. This is on herokugarden. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~--~~~~--~~--~--~---
Data upload
I have my data.yml file in teh db folder. when i go to my console and rake db:data:load i get an error after few minutes stating the page (with the console) could not be refreshed. the data is not loaded... this is on herokugarden any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to heroku@googlegroups.com To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~--~~~~--~~--~--~---