Coder Social home page Coder Social logo

Gem unusable in Rails 3 about cells HOT 5 CLOSED

electic avatar electic commented on July 30, 2024
Gem unusable in Rails 3

from cells.

Comments (5)

igray avatar igray commented on July 30, 2024

I had this problem in Rails 3.1rc4 and cells 3.6.3, but it went away when I downgraded to cells 3.6.2.

For Rails 3.0.5, try using cells 3.5.x.

from cells.

apotonick avatar apotonick commented on July 30, 2024

In 3.6.3 we tried to solve a helper issue with Cells, maybe that broke stuff. I will investigate on that later today! Thanks so far for your reports.

@electic: Are you sure you got this exception with 3.6.2?

@igray: Are you sure this came with Rails 3.1?

Anyway, try using 3.6.2 - this should work for both 3.x

from cells.

apotonick avatar apotonick commented on July 30, 2024

@electic: I can't reproduce this error in a Rails 3.0.5-8 environment and with Cells 3.6.3. Can you help me here?

from cells.

libc avatar libc commented on July 30, 2024
actionpack (3.0.7) lib/abstract_controller/rendering.rb:74:in `initialize'
actionpack (3.0.7) lib/abstract_controller/rendering.rb:74:in `initialize'
actionpack (3.0.7) lib/abstract_controller/layouts.rb:299:in `initialize'
cells (3.6.3) lib/cell/rails.rb:53:in `initialize'
cells (3.6.3) lib/cell.rb:28:in `new'
cells (3.6.3) lib/cell.rb:28:in `create_cell_for'
cells (3.6.3) lib/cell.rb:18:in `render_cell_for'
cells (3.6.3) lib/cells/rails.rb:53:in `render_cell'
ruby-1.8.7-p352 :015 > Cell::Rails.ancestors.each { |c| puts c.instance_method(:initialize) rescue nil }
#<UnboundMethod: Cell::Rails#initialize>
#<UnboundMethod: AbstractController::Layouts#initialize>
#<UnboundMethod: AbstractController::Rendering#initialize>
#<UnboundMethod: AbstractController::Base(Object)#initialize>
#<UnboundMethod: Object#initialize>
ruby-1.8.7-p352 :016 > Cell::Rails.ancestors.each { |c| puts c.instance_method(:initialize).arity rescue nil }
-2
-1
-1
0
0
ruby-1.8.7-p352 :017 > AbstractController::Base.instance_method(:initialize)
 => #<UnboundMethod: AbstractController::Base(Object)#initialize> 
irb(main):002:0> class A < Object;
irb(main):003:1* def initialize(a); super; end
irb(main):004:1> end
=> nil
irb(main):005:0> A.new(:a)
ArgumentError: wrong number of arguments (1 for 0)
    from (irb):3:in `initialize'
    from (irb):3:in `initialize'
    from (irb):5:in `new'
    from (irb):5

Changing line 53 in cell/rails.rb from super to super(*args) fixes the problem.

I think you can't reproduce it, because you're using ruby 1.9.2.

from cells.

apotonick avatar apotonick commented on July 30, 2024

Thanks dudes, this is fixed in 3.6.4: 96c2c6c

You've helped a ton with your reports and fixes, Thanks again :-)

from cells.

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.