Broken spree_fancy layout on heroku

落花浮王杯 提交于 2019-12-12 01:43:58

问题


I'm a rails newbie. I've install spree and spree fancy on my app. It's ok on development but when I've deployed it on heroku, the layout is broken. Can anyone help me fix this?

Question w/ Images: https://github.com/spree/spree_fancy/issues/68

Gemfile:

ruby '1.9.3'

gem 'rails_12factor', group: :production

gem 'rails', '4.0.0'

group :production do
  gem 'pg'
end        

group :development, :test do
  gem 'sqlite3'
end

gem 'sass-rails', '~> 4.0.0'

gem 'uglifier', '>= 1.3.0'

gem 'coffee-rails', '~> 4.0.0'

gem 'jquery-rails'

gem 'turbolinks'

gem 'jbuilder', '~> 1.2'

group :doc do
  gem 'sdoc', require: false
end

gem 'spree', '2.1.2'

gem 'spree_gateway', :git => 'link is omitted to post', :branch => '2-1-stable'

gem 'spree_auth_devise', :git => 'link is omitted to post', :branch => '2-1-stable'

gem 'spree_fancy', :git => 'link is omitted to post', :branch => '2-1-stable'

*links can be found on github

I've already done:

heroku run rake db:migrate 

after push into heroku.


回答1:


Probably you are missing your public/assets folder on your heroku app.

Take these steps from your app folder:

bundle exec rake assets:precompile
git add .
git commit -m "public/assets precompile"
git push heroku master
heroku open

In order to check out what is on your Heroku folder:

heroku ls public/assets

Also, in case you are having some more errors use this command in order to troubleshoot. I saw at some point some errors loading images. These errors are coming from ActionController:

heroku logs -n 500
heroku logs -n 500 | grep Action

This is what I was learning within the last days and hope it can be useful to someone.



来源:https://stackoverflow.com/questions/20131009/broken-spree-fancy-layout-on-heroku

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!