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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:18:02+00:00 2026-06-14T09:18:02+00:00

Trying to do a simple datatables implementation with my rails 3.2 app. I have

  • 0

Trying to do a simple datatables implementation with my rails 3.2 app. I have this exact app working in PHP and wanted to port it to ruby. I am not a Ruby expert just learning it.

I am basically following this example but with my Code and DB

http://asciicasts.com/episodes/340-datatables

  • I created my table and gave it a class and ID

  • I added this file -> /app/assets/javascripts/products.js.coffee which contains

    jQuery ->
    $(‘#run-table’).dataTable

      sPaginationType: "full_numbers"
      bServerSide: true
      iDisplayLength: 4
      aaSorting:[]
    

What I see on my web page is a properly formatted table with columns, sort icons, search filter text box, pagination numbers all correct. But it does not work.

If I do “bServerSide: true” Then any time I interact with the table I get

"NetworkError: 404 Not Found  - http://localhost:3000/null?sEcho=1&iColumns=11&sColumns=&iDisplayStart=0&iDisplayLength=4&...

So if I sort or add a search filter I get that error.

If I change it to “bServerSide: false” Then I get a correct looking table that load with my initial data but does nothing. No sorting, no filter, no pagination.

The part from that sample code I did not do was -> /app/datatables/products_datatable.rb because I did not see a need for it. With PHP I dont use server side and its about 4 lines of code to get this working.

Any help would be great I can provide more code snippets if needed

  • 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-14T09:18:03+00:00Added an answer on June 14, 2026 at 9:18 am

    this was a bug in my code in the view. I had tbody defined inside my loop I needed to move it above my loop. Stupid bug that I spent hours staring at and did not see it.

    This works fine now

         <tbody>
    
    
    <% @run.each do |c| %>
    
        <tr>
    
        <td><%= link_to c.idRun, step_url(c.idRun) -%>  </td>
    
        <td> <%= c.run_name %></td>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After trying this simple console input with 5, the result is shown as 53
I am trying this simple tutorial from oracle : http://www.oracle.com/technetwork/java/socket-140484.html (the Example 1 ).
i am enthusiast and new in programming trying this simple c language code and
Trying to make simple minesweeper game in python, but have one problem. I have
I have what seems to be a simple question but its killing me trying
I have a very simple question. I have been trying to export a set
I am using jQuery datatables in a dynamic PHP site. I have a page
I have xhtml page with simple form. This page is using for several data
I'm trying to write a simple Compact Framework winforms app. The main form has
This is so simple, I must be stupid! I have a simple access database

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.