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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:34:58+00:00 2026-06-10T00:34:58+00:00

My controller by nifty generators is having some block related problems. I’m quite new

  • 0

My controller by nifty generators is having some block related problems. I’m quite new to rails, so no doubt it’s a simple problem. Here is my error:

/home/forrest/.rvm/gems/ruby-1.9.2-p320@global/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require’: /home/forrest/code/luxeldb/app/models/maintenance_record.rb:16: syntax error, unexpected $end, expecting keyword_end (SyntaxError)

and here is my controller:

class MaintenanceRecordsController < ApplicationController
  def index
    @maintenance_records = MaintenanceRecord.find(:all)
  end

  def show
    @maintenance_record = MaintenanceRecord.find(params[:id])
  end

  def new
    @maintenance_record = MaintenanceRecord.new
  end

  def create
    @maintenance_record = MaintenanceRecord.new(params[:maintenance_record])
    if @maintenance_record.save
      redirect_to @maintenance_record, :notice => "Successfully created maintenance record."
    else
      render :action => 'new'
    end
  end

  def edit
    @maintenance_record = MaintenanceRecord.find(params[:id])
  end

  def update
    @maintenance_record = MaintenanceRecord.find(params[:id])
    if @maintenance_record.update_attributes(params[:maintenance_record])
      redirect_to @maintenance_record, :notice  => "Successfully updated maintenance record."
    else
      render :action => 'edit'
    end
  end

  def destroy
    @maintenance_record = MaintenanceRecord.find(params[:id])
    @maintenance_record.destroy
    redirect_to maintenance_records_url, :notice => "Successfully destroyed maintenance record."
  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-10T00:34:59+00:00Added an answer on June 10, 2026 at 12:34 am

    Reading directly from the error message, the syntax error is in your /home/forrest/code/luxeldb/app/models/maintenance_record.rb file, not the controller.

    You’ve missed an end keyword out, which Ruby spotted because it reached the end of the file ($end) when it was still waiting for an end keyword

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

Sidebar

Related Questions

I'm implementing some caching by using the nifty Rails.cache.fetch . However, in one particular
I have a problem with the new PageViewController (the one with the nifty page
I have some nifty javascript that serializes search input. the controller has this: @recipes
Controller: public class HomeController : Controller { Models.MakaleSitesiDBEntities entity = new Models.MakaleSitesiDBEntities(); public ActionResult
Inside Controller I need to get a rendered string and do some actions with
Within my controller specs I am stubbing out valid? for some routing tests, (based
Controller action: public ActionResult Index() { probaEntities proba = new probaEntities(); probaEntities proba1 =
Controller ClientDocument. def upload_document ClientDocument.upload_client_document(params) end Model ClientDocument. Class method.. def self.upload_client_document(params) self.new :uploaded_data
Controller public ActionResult GetCategories() { var htmlText = new StringBuilder(); var scriptText = new
In controller: var jsonData = new { total = totalPages, page = pageIndex, records

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.