Monthly Archives: August 2017

Revert code by command/Terminal (git)

(source: https://stackoverflow.com/questions/1146973/how-do-i-revert-all-local-changes-in-git-managed-project-to-previous-state) If you want to revert changes made to your working copy, do this: git checkout . If you want to revert changes made to the index (i.e., that you have added), do this. Warning this will reset all of … Continue reading

Posted in Uncategorized | Leave a comment

How to add ckeditor to active admin on Rails

Posted by PRASHANTRORBLOG on MAY 18, 2016 1. Gemfile gem ‘activeadmin’, github: ‘activeadmin’ gem ‘devise’ gem ‘paperclip’ gem ‘ckeditor’#, github: ‘galetahub/ckeditor’ bundle install rails generate active_admin:install rake db:migrate 2. /config/initializers/active_admin.rb # To load a javascript file: config.register_javascript ‘ckeditor/init.js’   3. rails g scaffold … Continue reading

Posted in Uncategorized | 1 Comment

Deploy Your Rails App to AWS

(source: https://www.sitepoint.com/deploy-your-rails-app-to-aws/) Sample Rails Application Let’s create a sample Rails application with a contact model and CRUD. The app uses Rails 4.2 and PostgreSQL: rails new contactbook -d postgresql After the application is generated, create a Contact model and CRUD: cd … Continue reading

Posted in Uncategorized | Leave a comment

Deploying a Rails App on Ubuntu 14.04 with Capistrano, Nginx, and Puma

(source Digital Ocean – url: https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma) Introduction Rails is an open source web application framework written in Ruby. It follows the Convention over Configuration philosophy by making assumptions that there is the ‘best’ way of doing things. This allows you to write … Continue reading

Posted in Uncategorized | Leave a comment

Use Capistrano 3 to Deploy Rails Applications – a Step-by-Step Tutorial (source: LaunchSchool/Blog)

Well, we have a well-developed application built with our laptop, but we want it to be seen by the entire world. Even better, we want to automate this process in order to push our new super-duper features in seconds with … Continue reading

Posted in Uncategorized | Leave a comment

Deploying Web Application on EC2 Instance- AWS (Posted on November 15, 2015 by Arpit Aggarwal)

In this post, we will deploy spring web application on EC2 Amazon Linux AMI t2.micro instance following below steps: Step 1: Set up Amazon EC2 instance following set-up-amazon-ec2-instance. Step 2: Launch an EC2 instance following ec2-launch-linux-instance. Step 3: Upload .war file from local machine directory to EC2 … Continue reading

Posted in Uncategorized | Leave a comment

Deploying Rails app to EC2 using Nginx, Unicorn by Capistrano (from www.katsuyaf.com )

Environment Ubuntu (14.04) Ruby on Rails (4.1.6) Nginx (1.4.6) Unicorn Capistrano (3.4.0) Make sure that you already have ssh access to EC2 server. For those who haven’t done this, check out here. To start with, you need to have Rails environment … Continue reading

Posted in Uncategorized | Leave a comment

Upload image to s3 used CarrierWave

Rails 4: upload image to s3 using fog and carrierwave March 13, 2014 at 4:55am by hasnan.1@osu.edu 1. Add these lines to your gemfile and run ‘bundle install’ # for aws cloud storage gem ‘fog’ # photo resizing gem “mini_magick” # file … Continue reading

Posted in Uncategorized | Leave a comment