顯示具有 heroku 標籤的文章。 顯示所有文章
顯示具有 heroku 標籤的文章。 顯示所有文章

2017年3月10日 星期五

rails_admin 上 heroku 沒CSS

進去admin之後沒有CSS及JS,頁面等於只剩html

http://stackoverflow.com/questions/18700219/rails-4-assets-not-loading-in-production

解決之道為
RAILS_ENV=production rake assets:precompile

並在application.rb加上
  config.assets.enabled = true

  config.assets.precompile += ['rails_admin/rails_admin.css','rails_admin/rails_admin.js'] 


看來production跟development還是有差別

2017年1月18日 星期三

ubuntu16.04 git deploy on heroku error solutions

after I add the gem 'pg' to the gemfile
and run bundle
still error!!
 
cmd line type this $sudo apt-get install libpq-dev  
bundle installed 

git init
git add .
git commit -m "First commit"
heroku create 
and git push heroku master is sucess. 
but the page wasn't show.
 
I read the log,it shows table error, 
 
heroku run rake db:migrate
 
done.finally.