【发布时间】:2015-04-02 18:53:19
【问题描述】:
我刚刚通过 rails 安装程序在我的 Windows PC 上安装了 rails —— 我对 rails 或任何东西都不太了解...在我创建了我的第一个应用程序 (rails new XXX) 并创建了第一个控制器之后然后查看,我运行了服务器,我看到的第一件事是一个错误:
Errno::ENOENT
Showing C:/Sites/XXX/XXX/app/views/layouts/application.html.erb where line #5 raised:
No such file or directory @ unlink_internal - C:/Users/XXX/AppData/Local/Temp/execjs20150402-8140-cy5cjejson
(in C:/Sites/XXX/XXX/app/assets/stylesheets/application.css.sass)
再一次,我从来没有接触过我的轨道,也没有写过任何代码,但仍然出现这个错误......我在网上搜索了几个小时以寻找答案,但没有一个能帮助我或解决我的问题......我尝试安装 Node.js、exejs,但没有任何帮助。
注意: 我注意到如果我删除
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
在应用模板中,网站正常运行(但我不想删除它——我需要它)
我该如何解决这个问题?
编辑:我的 gem 文件:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/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'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
【问题讨论】:
标签: javascript css ruby-on-rails ruby ruby-on-rails-4