-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.days returning Fixnum instead of Duration #17
Comments
+1 |
I've seen this problem too. Time.now
> 2012-01-30 18:04:09 -0200
Time.now + 1.day
> 2012-01-31 18:04:20 -0200 # correct
DateTime.now
> Mon, 30 Jan 2012 18:03:32 -0200
DateTime.now + 1.day
> Sun, 20 Aug 2248 18:03:49 -0200 # wrong With god 0.12.1 (and 0.11.0 also) and rails 3.0.11. |
More than a year and it's still open. I switched to monit becaus of this. |
Can't you just take god out of your Gemfile and install it on your system? |
This issue just killed us, please pretty please fix? We're gonna need to switch to monit (ugh). Thanks! |
How did you run into this? Are you putting "god" in your Gemfile? If so, try doing this:
|
I think it would make a lot of sense in sugar.rb to see if the method is already defined and raise an exception if it is. It will prevent people from accidentally requiring it. |
@eric - yeah , that (putting god in our gemfile) is what we were doing. We'll try the require solution, thanks! |
Just bit me in the ass too. Actually no -- this bit my client in the ass. This smells. |
I've had a couple ideas for how to solve this:
|
Fixed in 0.13.1. |
…ction. All production gems are now also installed in development to prevent errors like this. See: mojombo/god#17
The redefinition of days method in lib/god/sugar.rb:20 makes Date.end_of_week to return wrong dates.
https://rails.lighthouseapp.com/projects/8994/tickets/5548-dateend_of_week-not-working-in-production-mode
The text was updated successfully, but these errors were encountered: