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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:55:49+00:00 2026-06-14T07:55:49+00:00

I am following the Ruby on Rails Tutorial (http://ruby.railstutorial.org/chapters/a-demo-app#sec-modeling_demo_users) and successfully completed exercises up

  • 0

I am following the Ruby on Rails Tutorial (http://ruby.railstutorial.org/chapters/a-demo-app#sec-modeling_demo_users) and successfully completed exercises up to section 2.2.1.

Now experiencing a character encoding issue when I attempt to load any of the User resources (such as localhost:3000/users and localhost:3000/user/new) created in 2.2.1, which is basically out-of-the-box code generated with:

C:\Users\Dennis\rails_projects\demo_app> rails generate scaffold User name:string email:string

My environment:

  • Windows 7 64-bit
  • ruby 1.9.3p194 (2012-04-20) [i386-mingw32]
  • Rails 3.2.9

Rails returns an error page beginning with:

Encoding::InvalidByteSequenceError in Users#index

Showing C:/Users/Dennis/rails_projects/demo_app/app/views/layouts/application.html.erb where line #6 raised:

incomplete "\x00" on UTF-16LE
  (in C:/Users/Dennis/rails_projects/demo_app/app/assets/javascripts/users.js.coffee)

Extracted source (around line #6):

3: <head>
4:   <title>DemoApp</title>
5:   <%= stylesheet_link_tag    "application", :media => "all" %>
6:   <%= javascript_include_tag "application" %>
7:   <%= csrf_meta_tags %>
8: </head>
9: <body>

Contents of users.js.coffee:

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

Contents of application.html.erb:

<!DOCTYPE html>
<html>
<head>
  <title>DemoApp</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html> 

Contents of index.html.erb:

<h1>Listing users</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Email</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%= user.name %></td>
    <td><%= user.email %></td>
    <td><%= link_to 'Show', user %></td>
    <td><%= link_to 'Edit', edit_user_path(user) %></td>
    <td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New User', new_user_path %>
  • 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-14T07:55:51+00:00Added an answer on June 14, 2026 at 7:55 am

    Renaming users.js.coffee to users.js will work.

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

Sidebar

Related Questions

I'm following Ruby on Rails Tutorial: Learn Rails by Example, by Michael Hartl. http://ruby.railstutorial.org/chapters/a-demo-app#sec:a_micropost_microtour
I'm following the Ruby on Rails tutorial at http://railstutorial.org/chapters/beginning#sec:1.4.1 , and all is going
From the originall rail tutorial: http://ruby.railstutorial.org/chapters/a-demo-app#sec-a_user_tour URIs designed as followings /microposts /microposts/1 Now consider
I'm following the ruby on rails tutorial: http://railstutorial.org/chapters/static-pages#top I'm up to using rspec. Having
I am following a Ruby on Rails tutorial, http://ruby.railstutorial.org/chapters/filling-in-the-layout#top and I am stuck at
I am following Michael Hartl's Rails Tutorial Here: http://ruby.railstutorial.org/chapters/modeling-and-viewing-users-one#top I use this command to
I'm following the Ruby on Rails tutorial at http://ruby.railstutorial.org/chapters/static-pages and came across the following
I'm following this tutorial (http://ruby.railstutorial.org/chapters/sign-up#sec:signup_form). However, when code in Listing 7.23 (converted to haml)
I'm going through the second edition of Ruby on Rails Tutorial (http://ruby.railstutorial.org/). I'm following
I am following the Ruby on Rails tutorial by Michael Hartl http://ruby.railstutorial.org/ I installed

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.