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

  • Home
  • SEARCH
  • 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 8813563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:53:11+00:00 2026-06-14T03:53:11+00:00

After creating a database in the command line and migrating it, I cannot get

  • 0

After creating a database in the command line and migrating it, I cannot get rails to route properly to “http://localhost:3000/blog_entries” — it simply displays the default view, the same as just “http://localhost:3000”. If I add the code rails generated in the blog_entries index.html.erb into the application.html.erb view, it displays the results one would expect.

rake routes gives me the following:

      blog_entries GET    /blog_entries(.:format)          blog_entries#index
                POST   /blog_entries(.:format)          blog_entries#create
 new_blog_entry GET    /blog_entries/new(.:format)      blog_entries#new
edit_blog_entry GET    /blog_entries/:id/edit(.:format) blog_entries#edit
     blog_entry GET    /blog_entries/:id(.:format)      blog_entries#show
                PUT    /blog_entries/:id(.:format)      blog_entries#update
                DELETE /blog_entries/:id(.:format)      blog_entries#destroy
           root        /                                home#index

My routes.rb contains the following (atm… have searched hours for a solution, everything i’ve tried has failed):

RubydRailed::Application.routes.draw do

  resources :blog_entries do
    get "blog_entries"
  end

end

I am very new to rails, and really am having trouble understanding why rails is routing to application.html.erb for the URL “http://localhost:3000/blog_entries”. I have looked over the documentation, searched google and stakoverflow for a few hours now and I just can’t figure it out on my own. Help is greatly appreciated — I’m sure the answer is simple but I just don’t get it.

  • 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-14T03:53:13+00:00Added an answer on June 14, 2026 at 3:53 am

    application is your layout. There is <%= yield %> in it, this yield is rendering the view of current controller/action. In other words your layout (application.html.erb) rendering with each request and specific view for request rendered inside of it. %br

    Also delete index.html from the public/ directory.

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

Sidebar

Related Questions

This is actually 2 questions... Background: After using the command line in MySQL for
I've decided to restart my database over from scratch after it get very messy.
I've changed column length manually in my previous database. But after creating new database
I am creating database in my app,after creating the Db,i am trying to copy
What can be the database for a search engine? I mean after creating inverted
After creating a new form, I usually perform this ritual: Change the name into
After creating a new object (Foo), I set the key (BarId) for an EntityRef
After creating a metaclass using Moose::Meta::Class->create , how do I instantiate a real Moose
After creating a child process and exiting it immediately (_exit()), I want to perform
After creating a div on the fly with this markup: $('.circuit').prepend(<div class='component' draggable='true'>TRANSISTOR</div>); It

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.