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 7997923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:05:19+00:00 2026-06-04T15:05:19+00:00

Getting the following error: SyntaxError in FriendsController#index /Users/nelsonkeating/Desktop/ReminDeal/app/controllers/friends_controller.rb:32: syntax error, unexpected keyword_end, expecting ‘)’

  • 0

Getting the following error:

SyntaxError in FriendsController#index

/Users/nelsonkeating/Desktop/ReminDeal/app/controllers/friends_controller.rb:32: syntax error, unexpected keyword_end, expecting ')'
/Users/nelsonkeating/Desktop/ReminDeal/app/controllers/friends_controller.rb:58: syntax error, unexpected $end, expecting keyword_end
Rails.root: /Users/nelsonkeating/Desktop/ReminDeal

Application Trace | Framework Trace | Full Trace
activesupport (3.2.3) lib/active_support/dependencies.rb:469:in `load'
activesupport (3.2.3) lib/active_support/dependencies.rb:469:in `block in load_file'
activesupport (3.2.3) lib/active_support/dependencies.rb:639:in `new_constants_in'
activesupport (3.2.3) lib/active_support/dependencies.rb:468:in `load_file'
activesupport (3.2.3) lib/active_support/dependencies.rb:353:in `require_or_load'
activesupport (3.2.3) lib/active_support/dependencies.rb:502:in `load_missing_constant'
activesupport (3.2.3) lib/active_support/dependencies.rb:192:in `block in const_missing'
activesupport (3.2.3) lib/active_support/dependencies.rb:190:in `each'
activesupport (3.2.3) lib/active_support/dependencies.rb:190:in `const_missing'
activesupport (3.2.3) lib/active_support/inflector/methods.rb:229:in `block in constantize'
activesupport (3.2.3) lib/active_support/inflector/methods.rb:228:in `each'
activesupport (3.2.3) lib/active_support/inflector/methods.rb:228:in `constantize'
activesupport (3.2.3) lib/active_support/dependencies.rb:554:in `get'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:69:in `controller_reference'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:54:in `controller'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:32:in `call'
journey (1.0.3) lib/journey/router.rb:68:in `block in call'
journey (1.0.3) lib/journey/router.rb:56:in `each'
journey (1.0.3) lib/journey/router.rb:56:in `call'
actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:600:in `call'
client_side_validations (3.1.4) lib/client_side_validations/middleware.rb:18:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/cookies.rb:338:in `call'
activerecord (3.2.3) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `_run__4243183701801146600__call__3008343249707344054__callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.3) lib/rails/engine.rb:479:in `call'
railties (3.2.3) lib/rails/application.rb:220:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in `call'
thin (1.3.1) lib/thin/connection.rb:80:in `block in pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
rack (1.4.1) lib/rack/handler/thin.rb:13:in `run'
rack (1.4.1) lib/rack/server.rb:265:in `start'
railties (3.2.3) lib/rails/commands/server.rb:70:in `start'
railties (3.2.3) lib/rails/commands.rb:55:in `block in <top (required)>'
railties (3.2.3) lib/rails/commands.rb:50:in `tap'
railties (3.2.3) lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

My view:

class FriendsController < ApplicationController

  def index
    @friends = Friend.all
end

  def show
    @friend = Friend.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @friend }
    end
  end

  def new
    @friend = Friend.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @friend }
    end
  end

  def edit
    @friend = Friend.find(params[:id])
  end


  def create
    @friend = Friend.new(params[:friend]
  end

  def update
    @friend = Friend.find(params[:id])

    respond_to do |format|
      if @friend.update_attributes(params[:friend])
        format.html { redirect_to @friend, notice: 'Friend was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @friend.errors, status: :unprocessable_entity }
      end
    end



  def destroy
    @friend = Friend.find(params[:id])
    @friend.destroy

    respond_to do |format|
      format.html { redirect_to friends_url }
      format.json { head :no_content }
    end
  end
end
  • 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-04T15:05:22+00:00Added an answer on June 4, 2026 at 3:05 pm

    Looks like you are missing an end at the end of your update:

    @friend = Friend.find(params[:id])
      respond_to do |format|
        if @friend.update_attributes(params[:friend])
          format.html { redirect_to @friend, notice: 'Friend was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render action: "edit" }
          format.json { render json: @friend.errors, status: :unprocessable_entity }
        end
      end
    end #add this one :)
    

    And your create is missing a closing bracket at the end of it:

    def create
      @friend = Friend.new(params[:friend])
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the following error: Uncaught SyntaxError: Unexpected token ILLEGAL and this is
I am getting syntax error with the following statement REPLACE INTO users (screenname, token,
I am getting the following error syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on this line $this->email->subject($this->core_model->companyDetails()->coreCompanyName
I am getting the following error: Parse error: syntax error, unexpected '<' in /home/u7mtb69/public_html/wpsitehrhhw/wp-content/themes/hrhhw.1.1/functions.php
I am getting the following error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION
I am getting the following error: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in.. on
I am getting an SQl syntax error when running the following query and can
Binding a regexp to a parameter in perl, I'm getting the following error: syntax
Im setting up a simple method and I keep getting the following error: Syntax
I'm getting an Unexpected TOKEN illegal error on the following javascript: $(function() { $(‘.delete_post’).bind(‘ajax:success’,

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.