Rails-4,页面中的 ExecJS::ProgramError#welcome [英] Rails-4, ExecJS::ProgramError in Pages#welcome

查看:42
本文介绍了Rails-4,页面中的 ExecJS::ProgramError#welcome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试向我的 rails 应用程序添加登录-注销功能.为此,我添加了 bcrypt gem 用于密码加密和访问控制器.现在,当我在本地运行它时,收到一条错误消息.在添加上述功能之前,我的应用运行良好.

I am trying to add login-logout functionality to my rails app. For that I added bcrypt gem for password encryption and also access controller. Now when I run it locally, I get an error message. My app was running fine before adding the above functionality.

错误信息:

TypeError: Object doesn't support this property or method
(in C:/DevKit/lib/ruby/gems/1.9.1/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)

Extracted source (around line #8):

<head>
  <title>PostApp</title>
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track'=>true %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track'=>true %>  ----> Line 8

      <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
      <%= csrf_meta_tags %>

宝石文件:

source 'http://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.4'
# Use sqlite3 as the database for Active Record
group :development do
  gem 'sqlite3' 
end
group :production do
  gem 'pg'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'

我不知道我遇到了什么样的类型错误.知道会发生什么吗?

I don't know what kind of type error I am getting. Any idea what might be going on?

谢谢,中秋

推荐答案

在 windows 上运行的 coffee-script-source 1.9.0 存在问题.

There is a problem with coffee-script-source 1.9.0 running on windows.

看来您必须将此添加到您的 gemfile 中:

It seems you have to add this to your gemfile:

gem 'coffee-script-source', '1.8.0'

然后做

bundle update coffee-script-source

这篇关于Rails-4,页面中的 ExecJS::ProgramError#welcome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆