-3

on production ENV looks like this typeRAIL_ENV= testing or development server looks proper, but on production server not show proper GUI its expenses table

ACHYUT KADAM
  • 189
  • 1
  • 8

2 Answers2

0

As per the images shared it seems that the css and styling is not working in production environment.

For it to work, following command would be used:

RAILS_ENV=production rake assets:precompile

Reload the page and check if the css and js rules are being picked or not.

Rohan
  • 2,681
  • 1
  • 12
  • 18
  • I was use it but not working. rake assets:precompile its work only on testing and development server not working on production server. – ACHYUT KADAM Jun 04 '18 at 07:27
  • have you used the following command RAILS_ENV=production rake assets:precompile? – Rohan Jun 04 '18 at 07:32
  • ➜ flour_mill git:(master) RAILS_ENV=production bundle exec rake assets:precompile I, [2018-06-04T14:01:08.714582 #17476] INFO -- : Writing /home/ak/workspace/flour_mill/public/assets/application-3844a8a2cbdd07c01c446b5baaba6eda68ca2b90898be55186860e89a02747bc.css I, [2018-06-04T14:01:08.734131 #17476] INFO -- : Writing /home/ak/workspace/flour_mill/public/assets/application-3844a8a2cbdd07c01c446b5baaba6eda68ca2b90898be55186860e89a02747bc.css.gz – ACHYUT KADAM Jun 04 '18 at 08:33
  • No given error... only write new file in assets/application- 3844a8a2cbdd07c01c446b5baaba6eda68ca2b90898be55186860e89a02747bc.css – ACHYUT KADAM Jun 04 '18 at 08:37
  • is this line enabled in environments/production.rb config.serve_static_files = true – Rohan Jun 04 '18 at 08:51
  • can you not precompile in your development environment, then push the changes to your repo and then restart your rails server (after pulling the latest version of your code)? – RoRFan Jun 04 '18 at 09:54
  • my line = config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? your line = config.serve_static_files = true – ACHYUT KADAM Jun 04 '18 at 13:40
  • config.serve_static_files = true after this line show tables properly but some images or icon are not show. – ACHYUT KADAM Jun 04 '18 at 13:47
0

If you're using heroku perhaps you could try it on heroku. First run RAILS_ENV=production rake assets:precompile then run git add . within your working folder. Commit, push and then push to heroku master. See if you still have this issue.

John Doe
  • 596
  • 5
  • 8