我终于修复了程序中的大部分错误,但Ruby on Rails命令提示符一直给我同样的错误信息:
``1) Error:
StaticPagesControllerTest#test_should_get_about:
ActionView::Template::Error: 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)
app/views/layouts/application.html.erb:7:in ` _app_views_layouts_application_html_erb__148079984_48137160'
test/controllers/static_pages_controller_test.rb:17:in `block in <class:StaticPagesControllerTest>'
2) Error:
StaticPagesControllerTest#test_should_get_contact:
ActionView::Template::Error: 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)
app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb__148079984_48137160'
test/controllers/static_pages_controller_test.rb:23:in `block in <class:StaticPagesControllerTest>'
3) Error:
StaticPagesControllerTest#test_should_get_help:
ActionView::Template::Error: 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)
app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb__148079984_48137160'
test/controllers/static_pages_controller_test.rb:11:in `block in <class:StaticPagesControllerTest>'
4) Error:
StaticPagesControllerTest#test_should_get_home:
ActionView::Template::Error: 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)
app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb__148079984_48137160'
test/controllers/static_pages_controller_test.rb:5:in `block in <class:StaticPagesControllerTest>'
如何解决此问题?如果不解决这个问题,我无法进入我的应用程序。
答案 0 :(得分:1)
更可能 coffee-script 版本1.9.0 + gem错误,请使用gem 'coffee-script-source', '1.8.0'
(将其放在Gemfile中)。别忘了运行捆绑