Rails错误| Errno :: ENOENT in Categories#new

时间:2015-04-29 23:38:28

标签: ruby-on-rails ruby ruby-on-rails-4 routing

当我导航到我的类别/新网址时,我收到以下错误:

Errno::ENOENT in Categories#new
Showing c:/Users/Javi/desktop/rails_projects/testing_basics/app/views/layouts/application.html.erb where line #6 raised:

No such file or directory @ unlink_internal - C:/Users/Javi/AppData/Local/Temp/execjs20150429-4112-xc20tpjson
Rails.root: c:/Users/Javi/desktop/rails_projects/testing_basics

这是什么意思?这有点高于我的专业知识..

这是我的堆栈跟踪:

Started GET "/" for ::1 at 2015-04-29 16:43:08 -0700
  ActiveRecord::SchemaMigration Load (0.0ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Rails::WelcomeController#index as HTML
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/templates/rails/welcome/index.h
tml.erb (42.0ms)
Completed 200 OK in 382ms (Views: 266.7ms | ActiveRecord: 0.0ms)


Started GET "/categories/new" for ::1 at 2015-04-29 16:43:14 -0700
Processing by CategoriesController#new as HTML
  Rendered categories/new.html.erb within layouts/application (286.2ms)
Completed 500 Internal Server Error in 1434ms (ActiveRecord: 3.0ms)

ActionView::Template::Error (No such file or directory @ unlink_internal - C:/Users/Javi/AppData/Local/Temp/execjs201504
29-6172-1x8co6xjson):
    3: <head>
    4:   <title>TestingBasics</title>
    5:   <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
    6:   <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
    7:   <%= csrf_meta_tags %>
    8: </head>
    9: <body>
  app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__246374537_52769568'


  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/template
s/rescues/_source.erb (1.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/template
s/rescues/_trace.html.erb (10.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/template
s/rescues/_request_and_response.html.erb (1.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/template
s/rescues/template_error.html.erb within rescues/layout (258.6ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/_markup.html
.erb (0.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/style.css.er
b within layouts/inlined_string (0.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/_inner_conso
le_markup.html.erb within layouts/inlined_string (0.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/_prompt_box_
markup.html.erb within layouts/inlined_string (0.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/console.js.e
rb within layouts/javascript (268.8ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/main.js.erb
within layouts/javascript (1.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/error_page.j
s.erb within layouts/javascript (1.0ms)
  Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.1.2/lib/web_console/templates/index.html.e
rb (617.9ms)

好像它可能是一个宝石问题?或者我可能在最近的项目中意外删除了一些与我的rails安装程序或devkit等有关的内容?

1 个答案:

答案 0 :(得分:0)

Rails需要一个Javascript执行库。安装nodejs,或在gemfile中包含therubyracer gem。