我正在构建一个简单的 Rails 应用程序,当我加载主页时,我得到:
在 59 毫秒内完成 500 内部服务器错误 ActionView::Template::Error(不同的前缀:“c:/”和 “D:/workspaceRor/jrpappthree/ssets/stylesheets” (在 D:/workspaceRor/jrpappthree/app/assets/stylesheets/custom.css.scss)):
2: <html>
3: <head>
4: <title><%= full_title(yield(:title)) %></title>
5: <%= stylesheet_link_tag "application", media: "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: <%= render 'layouts/shim' %>
我的宝石文件
gem 'rails'
gem 'bootstrap-sass'
gem 'bcrypt-ruby'
gem 'faker'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
gem 'pg'
group :development, :test do
gem 'mysql2'
gem 'annotate'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
gem 'railties'
end
gem 'jquery-rails'
group :test do
end
group :production do
# gem 'pg'
end
在 D:/workspaceRor/jrpappthree/app/assets/stylesheets/custom.css.scss
@import "bootstrap";
body {
padding-top: 60px;
}
.
.
.
在开发环境中,它显示上述错误,但在生产中它工作正常。我什至试过
# config/environments/production.rb
...
config.assets.compile = true
...
但它没有解决我的问题。那么在开发环境中运行应用程序的解决方案是什么。成功地?