ruby-on-rails-4 – Rails-4,第#页中的ExecJS :: ProgramError欢迎

前端之家收集整理的这篇文章主要介绍了ruby-on-rails-4 – Rails-4,第#页中的ExecJS :: ProgramError欢迎前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试将登录注销功能添加到我的rails应用程序.为此我添加了密码加密的bcrypt gem,还有访问控制器.现在当我在本地运行时,我收到一条错误消息.在添加上述功能之前,我的应用程序运行正常.

错误信息:

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 %>

的Gemfile:

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'

我不知道我遇到什么类型的错误.任何想法可能会发生什么?

谢谢,
Chuchoo

解决方法

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

看来你必须把它添加到你的gemfile中:

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

然后做

bundle update coffee-script-source
原文链接:https://www.f2er.com/ruby/265810.html

猜你在找的Ruby相关文章