Skip to main content


Showing posts from May, 2016

Production deployment steps in rails?

Production deployment steps in rails? List of steps for Production deployment 1)In app folder -> git pull origin master 2)bundle install --path vendor/bundle 3)rake assets:precompile RAILS_ENV=production 4)touch tmp/restart.txt 5)If u want to restat server level command is  sudo service nginx restart 6)Stop the nginx server command is sudo service nginx stop 7)Starting the nginx server command is sudo service nginx start

Cronjob in ruby on rails

1)Install whenever gem2)In application folder run the wheneverize.3)In schedlue.rb fileevery 3.hours dorunner "MyModel.some_process"rake "my:rake:task"command "/usr/bin/my_great_command"end4)Write the rake task5)namespace :events do  desc "Rake task to get events data"  task :fetch => :environment do    events = Event.nba_search    events.each do |item|      item.each do |hash|        @event ={        # Code to instantiate an event        })      end    end    puts "#{} - Success!"  endendend6)whenever --update-crontab

Ruby Encoder Steps

List Of steps for RubyEncoder

1)Downlolad the -> Or else we can download in this link also
2)Copy above file in this directory -> /usr/local/bin  (RubyEncoder-2.2-Evaluation-Linux-x86_64-Install)
3)Give the permissions chmod 755 RubyEncoder-2.2-Evaluation-Linux-x86_64-Install
4)Run the RubyEncoder-2.2-Evaluation-Linux-x86_64-Install command
5)Open Existing Project
  i)Add button click
  ii)Choose for destination
  iii)Click on encode button
  iv)select the platform which one we want to encode
    4)Macos x
 6)Set the destination folder.
 7)Click on install button.