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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:51:05+00:00 2026-06-02T23:51:05+00:00

I am certainly losing my head/sleep over this. This is my questions_controller.rb class QuestionsController

  • 0

I am certainly losing my head/sleep over this.
This is my questions_controller.rb

class QuestionsController < ApplicationController
  # GET /questions
  # GET /questions.json
  def index
    @questions = Question.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @questions }
    end
  end

This is my applications_controller.rb

class ApplicationController < ActionController::Base
  protect_from_forgery
end

This is my rake routes:

    questions GET    /questions(.:format)          questions#index
              POST   /questions(.:format)          questions#create
 new_question GET    /questions/new(.:format)      questions#new
edit_question GET    /questions/:id/edit(.:format) questions#edit
     question GET    /questions/:id(.:format)      questions#show
              PUT    /questions/:id(.:format)      questions#update
              DELETE /questions/:id(.:format)      questions#destroy
   home_index GET    /home/index(.:format)         home#index

This is my routes.rb

App::Application.routes.draw do
  resources :questions
end

Error on going to http://0.0.0.0:3000/questions

uninitialized constant QuestionsController

What might be the error?

  • 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-02T23:51:08+00:00Added an answer on June 2, 2026 at 11:51 pm

    This kind of errors sometimes happen when there is a syntax error in one of files. Restart your dev server and look up for errors in its output.

    Especially check line

    format.html # index.html.erb
    

    I don’t think it can be written this way.

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

Sidebar

Related Questions

This is almost certainly a very silly question, but for some reason I'm having
this question is certainly newbie-generated. When I installed Apache and Passenger to work I
This can certainly be done using a simple script and reading the database. I
Adding member variables to a class certainly boosts the memory footprint of its instances
This isn't strictly a programming question, but I'm asking it here because it's certainly
Ok, so this may be a bit of a silly question, and there's certainly
It certainly runs on IE6. Why doesn't this JavaScript run in Mozilla Firefox? <html>
I think the answer to this is almost certainly no, because I've done a
Certainly there is no one right way to do this, but I can't even
Sorry if this is off topic - but it is certainly programming related .

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.