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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:10:49+00:00 2026-05-23T02:10:49+00:00

i am trying to start my server after a db:migrate:reset and suddenly my SQlite3

  • 0

i am trying to start my server after a db:migrate:reset and suddenly my SQlite3 server will not start. I get the error: ActionView::Template::Error (undefined method 'user_id' for nil:NilClass) when the server begins to render my datum/index page.
Before i did this i had actual prices in my database so the user_id could be detected and everything worked but now since the prices are gone i believe its giving this error.

Controllers – Datum & Price:

def index
  @prices = Price.all
end

Views – datum/index & prices/index:

<h1>Prices</h1>

<table>
  <tr>
    <th>User</th>
    <th>Date</th>
    <th>Price name</th>
    <th>Price</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @prices.each do |price| %>
  <tr>
    <td><%= price.user_id %></td>
    <td><%= price.date %></td>
    <td><%= price.price_name %></td>
    <td><%= price.price %></td>
    <td><%= link_to 'Show', price %></td>
    <td><%= link_to 'Edit', edit_price_path(price) %></td>
    <td><%= link_to 'Delete', price, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Price', new_price_path %>

I think i am doing this the wrong way as i am new to Rails. My goal was to duplicate my prices/index view so my datum/index is the same so i could then give both unique looks. How do i correct this issue and am i doing this correctly?

  • 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-05-23T02:10:50+00:00Added an answer on May 23, 2026 at 2:10 am

    Weird, i think it was giving this error because i was using AptanaStudio 3 with the git terminal. I just restarted everything and it started working now as if the Database needed time to refresh itself. So in conclusion just restart everything and see if it works then.

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

Sidebar

Related Questions

After increasing the timeout period trying kill server and start server commands restarting avd
I get the following timeout error when trying to start tomcat in eclipse. Timeout
When trying to start my JUnit-Test out of Eclipse, I get a ClassNotFoundException. When
EDIT Solution: Visit your IP in the browser after you node server.js to kick-start
I am trying to implement a server-client connection over the spp. After initializing the
I am trying to get tests working after switching from Webrat to Capybara. When
I'm trying to connect, using Net::SSH, to a server that immediately after login executes
I have a strange problem while trying to start JBoss from Eclipse. After starting,
Good Evening, I am trying to get the login details after the user press
I'm trying to start a service as a user and things work fine, until

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.