Skip to main content

Posts

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 gem 2)In application folder run the wheneverize. 3)In schedlue.rb file every 3.hours do runner "MyModel.some_process" rake "my:rake:task" command "/usr/bin/my_great_command" end 4)Write the rake task 5)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 = Event.new({         # Code to instantiate an event         })         @event.save       end     end     puts "#{Time.now} - Success!"   end end end 6)whenever --update-crontab

Ruby Encoder Steps

List Of steps for RubyEncoder 1)Downlolad the https://www.rubyencoder.com/profile.html -> 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     1)FreeBSD     2)Linux     3)Windows     4)Macos x  6)Set the destination folder.  7)Click on install button.