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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:57:46+00:00 2026-05-25T23:57:46+00:00

I am using RVM and have installed rails 3.1.0 multiple times but once I

  • 0

I am using RVM and have installed rails 3.1.0 multiple times but once I begin using it I get the same error over and over again.

From a fresh install of rails 3.1.0 I do the following:

rails new fishapp

cd fishapp

bundle install

rails g scaffold Fish name:string

bundle exec rake db:migrate

But each time I go to http://localhost:3000/fish I get:

Showing /Users/me/code/rails31/fishapp/app/views/layouts/application.html.erb where line #6 raised:

uninitialized constant JSON::ParserError
  (in /Users/me/code/rails31/fishapp/app/assets/javascripts/fish.js.coffee)

Extracted source (around line #6):

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

I must have broke something trying to get rails installed or something as I don’t otherwise understand why it would fail of a fresh install. Any ideas?

  • 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-25T23:57:47+00:00Added an answer on May 25, 2026 at 11:57 pm

    Initially I simply commented out line #6 (just so I could keep working).

    <%#= javascript_include_tag "application" %>
    

    Eventually I needed javascript, so I had to return to this issue. I kept the line above commented out, and just hard-coded this one immediately below it:

    <script src="/assets/application.js" type="text/javascript"></script>
    

    The page loaded fine, so I viewed the page’s source, and looked at

    http://0.0.0.0:3000/assets/application.js
    

    … only to find a similar error:

    throw Error("NameError: uninitialized constant JSON::ParserError
    (in /Users/me/Dev/fishapp/app/assets/javascripts/products.js.coffee)")
    

    So I decided to load a rails console and see if I could load the JSON gem, but got an error with iconv:

    ruby-1.9.2-p290 :001 > require 'json'
    LoadError: no such file to load -- iconv
    

    Meanwhile loading the rails gem produced:

    ruby-1.9.2-p290 :004 > require 'rails'
     => false 
    

    So I searched around and found this:

    http://beginrescueend.com/packages/iconv/

    Follow those instructions, and your problem will be resolved! For the record, those instructions are:

    rvm pkg install iconv
    rvm remove 1.9.2
    rvm install 1.9.2 --with-iconv-dir=$rvm_path/usr
    

    I’m leaving the steps I took in case others search Google for similar errors.

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

Sidebar

Related Questions

I have tried several times to install rails. Using RVM, then compiling the source
I have already installed Ruby 1.9.3,gem 1.8.24, using RVM in ubantu 12.04. But when
I am trying to get a multiple ruby/rails environment set up with rvm but
I have been using rvm and when I installed ruby 1.9.2, it installed ruby-1.9.2-p290
Possible Duplicate: Error loading Active Record gem with sinatra app using RVM I have
I'm unable to have rails recognize the mysql2 gem that I've installed. I'm using
I have upgraded ruby using the following commands with rvm: rvm get head rvm
I am using Ubuntu 12.04. I also have ruby and rails installed on my
I have installed rails 3.1 with apache2 and passenger on ubuntu 10.04 . using
I have installed RubyMine on Mac but my development environment for Ruby and Rails

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.