Blog Archives

Create and integrate SSL certificate in Rails app Using [ Godaddy + Nginx(1.8) + Puma + Ubuntu Server(14.04 LTS) ]

Login to your server by ssh and then: Create file YOUR_RAILS_APP_DIRECTORY/config/puma.rb Below is puma.rb file content: #!/usr/bin/env puma directory ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/public/’ rackup ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/config.ru’ environment ‘production’ daemonize true pidfile ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/tmp/pids/puma.pid’ state_path ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/tmp/pids/puma.state’ stdout_redirect ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/log/puma.log’ threads 2, 5 bind ‘unix:///home/ubuntu/YOUR_RAILS_APP_DIRECTORY/tmp/sockets/puma.sock’ workers 2 Generate

Tagged with: , , ,
Posted in amazon, DNS, Godaddy, Nginx, production, Puma, Ruby on Rails, Ubuntu

Rails production environment assets loading

In Gemfile add: gem ‘rails_12factor’ In config/environments/production.rb add config.assets.compile = false #To stop run time assets precompile in production. config.assets.digest = true #To access assets which are precompiled and in their names have appendend digets by rails config.cache_classes = true

Tagged with: ,
Posted in production, Ruby on Rails
StackOverFlow
Categories
Archives