ExecJS::ProgramError in Welcome#index TypeError: Object 不支持此属性或方法 [英] ExecJS::ProgramError in Welcome#index TypeError: Object doesn't support this property or method
问题描述
我对 Ruby on Rails 完全陌生,在我的 Windows 8 机器上安装了该软件非常困难.现在我只是按照本指南创建一个示例 Hello World 示例.>
当我尝试按照 4.3 设置应用程序主页部分中给出的步骤进行操作时,我开始遇到问题.
这是我所做的:
1) 在编辑器中打开文件 config/routes.rb.
2) 取消注释 root 'welcome#index'
3) 重启服务器.
现在,当我以 localhost:3000
访问 URL 时,我的浏览器开始出现以下错误:
ExecJS::ProgramError in Welcome#index显示 E:/Rails/blog/app/views/layouts/application.html.erb 其中第 6 行提出:类型错误:对象不支持此属性或方法(在 C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)提取的源代码(围绕第 6 行):<头><title>博客</title><%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' =>真%><%= javascript_include_tag 'application', 'data-turbolinks-track' =>真%><%= csrf_meta_tags %>头部><身体>Rails.root: E:/Rails/blog
你能告诉我为什么我会遇到这个问题吗?
也是使用Ruby On Rails 开发应用程序很吗?因为我已经尝试了 2 天,但直到现在我在看到 Hello World 示例之前遇到了很多问题.我曾研究过基于 Java 的框架,但在安装或创建基本应用程序方面从未遇到过如此大的困难.
在你的 /app/views/layouts/application.html.erb 行 5 和 6 中,将第一个参数 application 更改为 default.
I am complete new to Ruby on Rails, with great difficulty I have installed the software on my Windows 8 machine. Now I am just following this guide to create a sample Hello World example.
When I am trying to follow the steps given given in section 4.3 Setting the Application Home Page, I started facing issue.
Here is what I did:
1) Open the file config/routes.rb in your editor.
2) Uncommented the line root 'welcome#index'
3) restarted the server.
Now when I access the URL as localhost:3000
then I started getting below error on my browser:
ExecJS::ProgramError in Welcome#index
Showing E:/Rails/blog/app/views/layouts/application.html.erb where line #6 raised:
TypeError: Object doesn't support this property or method
(in C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)
Extracted source (around line #6):
<head>
<title>Blog</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body>
Rails.root: E:/Rails/blog
Can you please tell me why I am getting this issue?
Also is developing applications using Ruby On Rails is very? because it has been 2 days since I am trying but till now I faced so many issues before I see the Hello World example. I have worked on Java based frameworks but I never faced so much difficulty in installation or creating basic applications.
In your /app/views/layouts/application.html.erb line 5 and 6, change the first parameter application to default.
这篇关于ExecJS::ProgramError in Welcome#index TypeError: Object 不支持此属性或方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!