User Tools

Site Tools


prod:rails

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
prod:rails [2017/12/22 15:49] slackprod:rails [2021/04/11 16:12] (current) – [rbenv] slack
Line 1: Line 1:
   apt-get install apache2 curl git default-libmysqlclient-dev mysql-server libsqlite3-dev nodejs libssl-dev libreadline-dev   apt-get install apache2 curl git default-libmysqlclient-dev mysql-server libsqlite3-dev nodejs libssl-dev libreadline-dev
      
-====== rbenv ======+====== rbenv or RVM ======
  
-[[stretch:rbenv]]+[[stretch:rbenv]] or [[:buster:RVM]]
  
 ====== ruby ====== ====== ruby ======
Line 17: Line 17:
   sudo apt-get install -y nodejs &&   sudo apt-get install -y nodejs &&
   sudo ln -sf /usr/bin/nodejs /usr/local/bin/node   sudo ln -sf /usr/bin/nodejs /usr/local/bin/node
 +  sudo apt-get install sqlite3 libsqlite3-dev
 +
 +Setting production server-wide:
 +
 +Create ''/etc/profile.d/rails_env.sh'':
 +
 +  export RAILS_ENV=production
 +
 +===== Update and resolve dependency conflicts =====
 +
 +Starting point for addressing many security alerts:
 +
 +  # consider updating to the newest ruby
 +  cd /home/slack/.rbenv/plugins/ruby-build && git pull && cd -
 +  rbenv install x.x.x -k   # latest https://www.ruby-lang.org/en/downloads/
 +  rbenv local x.x.x
 +  
 +  # update bundler and gems
 +  gem install bundler
 +  bundle update --bundler
 +  bundle update rails
 +
 +''Gemfile.lock'' is there to ensure that the production server uses exactly the same gems as in development.  If you are struggling with conflicts, you can just remove it and see what happens.
 +
 ====== passenger ====== ====== passenger ======
  
Line 22: Line 46:
  
     PassengerRuby /home/slack/.rbenv/shims/ruby     PassengerRuby /home/slack/.rbenv/shims/ruby
 +
 +====== Acromatic ======
 +
 +  apt install docx2txt
 +
  
prod/rails.1513957752.txt.gz · Last modified: 2019/11/07 17:58 (external edit)