我在5.1.2的railstutorial中,我剛剛安裝了Bootstrap-sass(我已經仔細檢查過,這個gem在那裏)。 http://ruby.railstutorial.org/chapters/filling-in-the-layout#top添加@import「bootstrap」後出現錯誤; Static_pages中的參數錯誤#home
我添加文件: 應用程序/資產/樣式表/ custom.css.scss
當我給它這樣的內容:
@import "bootstrap";
我的http://本地主機:3000/static_pages/home不再有效。它給出了以下錯誤:
ArgumentError in Static_pages#home
Showing c:/Sites/rails_projects/sample_app/app/views/layouts/application.html.erb where line #5 raised:
different prefix: "e:/" and "c:/Sites/rails_projects/sample_app/app/assets/stylesheets"
(in c:/Sites/rails_projects/sample_app/app/assets/stylesheets/custom.css.scss)
Extracted source (around line #5):
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: <!--[if lt IE 9]>
Rails.root: c:/Sites/rails_projects/sample_app
Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___557356520_29974776'
任何幫助將不勝感激,謝謝!
您是否在不同的路徑上安裝了ruby安裝程序和您的項目? – Mindbreaker 2013-05-04 09:51:14
是的,Rails安裝程序在這裏:E:\ RailsInstaller。該項目位於C:\ Sites \ rails_projects \ sample_app。這是一個問題嗎?到目前爲止一切工作正常 – user2349461 2013-05-04 10:24:38
好了我的項目複製到E驅動器,這解決了問題,謝謝。我希望雖然我不會導致Github和heroku問題 – user2349461 2013-05-04 10:56:29