Git Product home page Git Product logo

Comments (3)

gaelian avatar gaelian commented on August 20, 2024

I can't reproduce this. Are you able to provide more information on exactly what steps got you to this issue?

from enki.

toufiqueimam avatar toufiqueimam commented on August 20, 2024
  1. I cloned the repo to my pc (git clone https://github.com/xaviershay/enki.git)
  2. run bundle install
  3. run rake db:migrate
  4. run rails server
  5. I went to the admin and added my first post. after creating the post, when I tried to load the home page, I get the following error

http://pastebin.com/Frmn6sWS

from enki.

gaelian avatar gaelian commented on August 20, 2024

So I take it that you also copied database.example.yml to database.yml to get as far as you have. And that you're using SQLite as per the default database.yml? And I assume you're setting your post as published, otherwise the link_to_post_comments method wouldn't be getting called.

Obviously you're getting an error for some reason but I cannot reproduce it, following your steps as laid out. I am currently using Ruby 2.0.0-p598 and bundle install-ing into an RVM gemset, not that I would think this should make any difference.

The link_to_post_comments method is pretty straight forward:

  def link_to_post_comments(post)
    link_text = pluralize(post.approved_comments.size, "comment")
    if post.published?
      link_to(link_text, post_path(post, :anchor => 'comments'))
    else
      # Posts would have to be published to be on the public index,
      # the only place where a fragment won't work.
      link_to(link_text, '#comments')
    end
  end

I'm not even sure where the call to a name method is coming into it. Neither Post nor Comment models even have a name attribute. The Tags model has a name attribute though.

You could take a look in your database and make sure things look as they should. Or try some good old fashioned debugging... I'd be attempting to figure out where/how/why this name method is apparently being called, if I were you.

from enki.

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.