Giter Club home page Giter Club logo

Comments (11)

kaluznyo avatar kaluznyo commented on August 27, 2024

+1

from god.

daronco avatar daronco commented on August 27, 2024

I've seen this problem too.
When using Fixnum#days, #hours or #minutes in an operation with Time objects it works, but it fails with DateTime objects.

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.

from god.

rogercampos avatar rogercampos commented on August 27, 2024

More than a year and it's still open. I switched to monit becaus of this.

from god.

jnwheeler44 avatar jnwheeler44 commented on August 27, 2024

Can't you just take god out of your Gemfile and install it on your system?

from god.

mdesjardins avatar mdesjardins commented on August 27, 2024

This issue just killed us, please pretty please fix? We're gonna need to switch to monit (ugh). Thanks!

from god.

eric avatar eric commented on August 27, 2024

How did you run into this? Are you putting "god" in your Gemfile?

If so, try doing this:

gem 'god', :require => false

from god.

eric avatar eric commented on August 27, 2024

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.

from god.

mdesjardins avatar mdesjardins commented on August 27, 2024

@eric - yeah , that (putting god in our gemfile) is what we were doing. We'll try the require solution, thanks!

from god.

mdarby avatar mdarby commented on August 27, 2024

Just bit me in the ass too. Actually no -- this bit my client in the ass. This smells.

from god.

eric avatar eric commented on August 27, 2024

I've had a couple ideas for how to solve this:

  1. Raise an exception if god is required when ActiveSupport is found —
    there shouldn't be a reason to use god in other projects
  2. Move everything out of lib/god.rb so if it is automatically
    included in a Gemfile, it won't hurt anything

from god.

eric avatar eric commented on August 27, 2024

Fixed in 0.13.1.

from god.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.