Question

I am using the digital ocean ruby on rails image which has nginx and unicorn. I bundled my project bundle install and then did service unicorn restart but it doesnt seem to be loading. I had this issue a while ago and solved it using bundle exec ... but I cant remember the full command. I saw a few issue similar to this and tried bundle exec rake assets:precompile as well as editing the production.rb (Why "rails server -e production" makes it "No route matches "/" and stylesheet not loading?) file but it does not work. I am looking for the solution to do this through the command and not through code.

EDIT: bundle exec rake assets:precompile did somewhat work! The problem is that I created an extra css file called main.css which isnt importing, but everything else works!

Was it helpful?

Solution

Use RAILS_ENV=production rake assets:precompile. RAILS_ENV=production specifies the environment in which you run your rake tasks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top