0

I'm following Michael Hart's Ruby tutorial, precisely chapter 5. When I'm running my application I having the following error:

ExecJS::ProgramError in StaticPages#home

<%= link_to image_tag("rails.png", alt: "Rails logo"), 'http://rubyonrails.org/' %>

TypeError: Object doesn't support this property or method

I've seen this post on SO. Some answers says to install NodeJS and others says to add coffee-script-source. Installing NodeJS for me is a bit strange.

I'm running this in Windows 10 64 bits.

This is my gemfile:

source 'https://rubygems.org'
git_source(:github) do |repo_name|
   repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
   "https://github.com/#{repo_name}.git"
end

gem 'rails',                   '5.0.1'
gem 'bcrypt',                  '3.1.11'
gem 'faker',                   '1.6.6'
gem 'carrierwave',             '0.11.2'
gem 'mini_magick',             '4.5.1'
gem 'fog',                     '1.38.0'
gem 'will_paginate',           '3.1.0'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'bootstrap-sass',          '3.3.6'
gem 'puma',                    '3.4.0'
gem 'sass-rails',              '5.0.6'
gem 'uglifier',                '3.0.0'
gem 'coffee-rails',            '4.2.1'
gem 'jquery-rails',            '4.1.1'
gem 'turbolinks',              '5.0.1'
gem 'jbuilder',                '2.4.1'

group :development, :test do
    gem 'sqlite3', '1.3.12'
    gem 'byebug',  '9.0.0', platform: :mri
end

group :development do
    gem 'web-console',           '3.1.1'
    gem 'listen',                '3.0.8'
    gem 'spring',                '1.7.2'
    gem 'spring-watcher-listen', '2.0.0'
end

group :test do
    gem 'rails-controller-testing', '0.1.1'
    gem 'minitest-reporters',       '1.1.9'
    gem 'guard',                    '2.13.0'
    gem 'guard-minitest',           '2.4.4'
end

group :production do
    gem 'pg',   '0.18.4'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Community
  • 1
  • 1
learner
  • 1,311
  • 3
  • 18
  • 39

1 Answers1

0

Solved. Based on Thorin's answer I installed coffee script source and worked fine.

learner
  • 1,311
  • 3
  • 18
  • 39