我建立一個簡單的Rails應用程序,當我加載主頁我得到:@import '引導' Win7上的錯誤,顯示500錯誤
Completed 500 Internal Server Error in 59ms ActionView::Template::Error (different prefix: "c:/" and "D:/workspaceRor/jrpappthree/ ssets/stylesheets" (in 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
...
但它沒有解決我的問題。 那麼在開發環境中運行應用程序的解決方案是什麼?成功?
非常感謝。有效。 – 2012-04-17 20:43:31