Yes, @post will be nil in the partial.
Because, while rendering partial, you have mentioned the local variable post as @post. But using @post in partial.
Just use post in that partial.
in _karma_value.html.erb
<% if !(post.karma.nil?) %>
<%= post.karma %>
<% end %>