Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:35:24+00:00 2026-06-07T05:35:24+00:00

I have a Rails app deployed on Heroku. It’s the Twitter app given in

  • 0

I have a Rails app deployed on Heroku. It’s the Twitter app given in a lot of samples. I was trying to learn how to git a Rails app deployed on Heroku. Anyway, when clicking on the follow button, nothing happens. I used heroku logs and found this to be the issue:

NoMethodError (undefined method `[]' for nil:NilClass):
app/controllers/user_relationships_controller.rb:6:in `create'

The parameters passed are this:

Parameters: {"utf8"=>"✓", "authenticity_token"=>"NIiiOgQ4iowSxezGmvLk3oV/vul+4ysWoFrgh/1eOAY=", "user_id"=>{"follower_id"=>"1"}, "commit"=>"follow"}

Which corresponds to this line:

@user = User.find(params[:user_id][:follower_id])

Could someone please point me in the right direction? Thanks!

As requested:

<%= form_for current_user.user.build(:follower_id => @user.id), 
         :remote => true do |f| %>
<div><%= f.hidden_field :follower_id %></div>
<div class="actions"><%= f.submit "follow" %></div>
<% end %>

$('#follow_form').replaceWith("<%= escape_javascript render(:file =>'users/_follow_form') %>");
$('#followers').replaceWith('<div id="followers"><h1><%= "Followers: #{@user.followers.count}" %></h1></div>');
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:35:26+00:00Added an answer on June 7, 2026 at 5:35 am

    I’m terribly sorry I bothered you with this. For whatever reason, I had two controllers named very similarly. It was using the wrong one and I didn’t realize it. I switched the code and now it works. Thanks for the input!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have deployed a rails 3.1 app to Heroku Cedar stack, and am trying
I have a Rails app deployed on Heroku and I have a git repo
I have an existing Rails app on GitHub and deployed on Heroku. I'm trying
I have a Rails app deployed on Heroku with the Heroku scheduler add-on successfully
I deployed a Ruby on Rails app to Heroku, and I realized they have
I have a rails app deployed to heroku. I have used paperclipftp to upload
I have installed paperclip on my rails app (deployed on heroku). On my localhost
I have an existing Rails 3.1rc4 app deployed to heroku on the Bamboo stack.
I have a Rails 3.1 app deployed to Heroku. This app makes heavy use
I have a rails app deployed to heroku. I have a form on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.