Rails ExecJS :: Pages错误在页面#home?启动一个新的应用程序,当我创建一个控制器页面回家并尝试转到本地主机:3000 / pages / home时,我收到以下错误:Showing c:/Users/Doesha/desktop/pinplug/app/views/layouts/application.html.erb where line #6 raised:TypeError: Object doesn't support this property or method (in c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)application.html.erb文件:<!DOCTYPE html><html><head> <title>Pinplug</title> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= csrf_meta_tags %></head><body><%= yield %></body></html>application_controller.rb文件:class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exceptionendpages_controller.rb文件:class PagesController < ApplicationController def home endendroutes.rb文件:Rails.application.routes.draw do get 'pages/home' # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" # root 'welcome#index' # Example of regular route: # get 'products/:id' => 'catalog#view' # Example of named route that can be invoked with purchase_url(id: product.id) # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase # Example resource route (maps HTTP verbs to controller actions automatically): # resources :products # Example resource route with options: # resources :products do # member do # get 'short' # post 'toggle' # end # # collection do # get 'sold' # end # end # Example resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end
3 回答
Cats萌萌
TA贡献1805条经验 获得超9个赞
如果您在WIndows中运行,那么coffee-script-source 1.9.0在Windows上不起作用。
将其更改为以前版本将此行添加到您的Gemfile:
gem 'coffee-script-source', '1.8.0'
然后重新安装捆绑包,调整新Gem版本的依赖关系:
bundle update coffee-script-source
- 3 回答
- 0 关注
- 574 浏览
添加回答
举报
0/150
提交
取消