アプリを開発から本番に切り替えたいとき。
(rails server または rails server -e production) でアプリを実行できます
どちらも正常に動作します!!
しかし、パッセンジャー 3.x + nginx で実行しようとすると、次のエラーが表示されます。
Started GET "/" for 127.0.0.1 at 2013-10-10 08:24:33 +0800
Processing by UrltestsController#index as HTML
Rendered urltests/index.html.haml within layouts/application (6.4ms)
Completed 500 Internal Server Error in 4919ms
ActionView::Template::Error (Invalid CSS after "background-color: ": expected expression (e.g. 1px, bold), was "#white;"
(in /Volumes/COMMON/Dropbox/rails/zeus/app/assets/stylesheets/application.css)):
3: %head
4: %meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=UTF-8'}
5: %title DQA Automation Tools Web Server Version
6: = stylesheet_link_tag 'application', :media=>'all'
7: = javascript_include_tag 'jquery','application'
8: = csrf_meta_tags
9: = tinymce_assets
app/views/layouts/application.html.haml:6:in `_app_views_layouts_application_html_haml__2974668664975918893_70349045950040'
app/controllers/urltests_controller.rb:11:in `index'
だから私は実行しようとします
RAILS_ENV=production bundle exec rake assets:precompile
しかし、それでも失敗しました
** Execute assets:precompile:primary
rake aborted!
Invalid CSS after "background-color: ": expected expression (e.g. 1px, bold), was "#white;"
(in /Volumes/COMMON/Dropbox/rails/zeus/app/assets/stylesheets/application.css)
(sass):1738
/Volumes/COMMON/Dropbox/rails/zeus/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:1147:in `expected'
/Volumes/COMMON/Dropbox/rails/zeus/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/Volumes/COMMON/Dropbox/rails/zeus/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile
私のcssファイルをgrepする
stylesheets/custom.css.scss
83: background-color:#333333;
stylesheets/menu.css
7:background-color: #2f3c4c; }
11:background-color: #white;
21:background-color: white; }
38:background-color: gray;
45:background-color: #red; }
47:background-color: #2f3c4c;
57:background-color: gray;
72:background-color: gray;
85:background-color: #cce0cc; }
87:background-color: white;
91: background-color: red;
stylesheets/scaffolds.css.scss
2: background-color: #fff;
16: background-color: #eee;
28: background-color: #000;
44: background-color: red;
54: background-color: #f0f0f0;
62: background-color: #c00;