0

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.

zeroed
  • 548
  • 1
  • 7
  • 15
  • Your missing images are a little troubling. Right click them and see the url of the image. Is it the location you expect? – joncodo Nov 21 '13 at 20:17
  • Heroku restart doesn't work. ... Yes, the link is [site]/images/store/logo-white.png, which is pretty much I expect them to be as they are default. The images are one thing but the whole layout of fancy is broken. (Only the text managed to survive the deploy). I've already tried restarting from scratch, same result when I deploy to heroku. – user3019177 Nov 21 '13 at 20:50
  • Are these css files and images made public? Do you need to compile your assets when performing a deploy. This could be a lot of things. You can restart Heroku http://stackoverflow.com/questions/14612695/heroku-how-can-i-restart-my-rails-server – joncodo Nov 22 '13 at 14:55
  • You could also open a heroku console on the heroku box with heroku run console and try a bundle install and see if the gem you added is getting installed on that box. – joncodo Nov 22 '13 at 14:57

1 Answers1

0

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.

gobeltri
  • 329
  • 3
  • 10