Posts

Showing posts from 2016

SOLUTION OF DEADLOCK ERROR

When we run cap production deploy command then we are getting problem :-Unfortunately, an unexpected error occurred, and Bundler cannot continue.

fatal: No live threads left. Deadlock?

For solving that problem , change the version of Bundler

root@13-14-146-203:-$gem uninstall bundler --version ourversion

and Install new bundler version :-

root@13-14-146-203:-$gem install bundler --version 1.10.6

Now, it will solve

cap production deploy

GETTING ERROR AT THE TIME SUDO APT-GET UPDATE

Refer this if we got error when we run sudo apt-get update
W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead. WE CAN FOLLOW THIS LINK :-https://github.com/nodesource/distributions/issues/324

SOLVE ELASTICSEARCH PROBLEM (ELASTICSEARCH::TRANSPORT::TRANSPORT::ERRORS::INTERNALSERVERERROR)

If you are getting elastic search problem like:-
Elasticsearch::Transport::Transport::Errors::InternalServerError ([500] {"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [100000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"products_production_20170602132421194","node":"8jzDe_f6T2Kw7UF6urQJkg","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + siz…

INSTALLING RUBY ON RAILS IN UBUNTU

Steps for installing ruby on rails successfully on Ubuntu The first step is to install some dependencies for Ruby:sudo apt-get update

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties

sudo apt-get install libmysqlclient-dev

sudo apt-get install libpq-dev

sudo apt-get install imagemagick

sudo apt-get install libmagickwand-dev
The installation for rvm is pretty simple:sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev






curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

curl -L https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc

rvm install 2.1.2

rvm use 2.1.2 --default

ruby -v
The last step is to tell Rubygems not to install the documentation for each package locallyecho "gem: --no-ri --no-rdoc" > ~/.gemrc Installing Railssudo add-apt-re…

MANDRILL MAILER INTEGRATION IN RAILS

Send mail using Mandrill Mailer We will refer :- https://github.com/renz45/mandrill_mailer
Add gem in our gemfilegem 'mandrill_mailer'
If we are using Devise gem then we have to change the devise mailer setting and call our Mailerconfig/devise.rb      config.mailer = 'InvitationMailer'
Add credentials and mailer setting in our ENV file config/environments/development.rbRails.application.configure do
config.action_mailer.delivery_method = :smtp
          config.action_mailer.perform_deliveries = true
          config.action_mailer.smtp_settings = {
                :address                         =>              "smtp.mandrillapp.com",
                :port                               =>              587,
                :enable_starttls_auto   =>              true,
                :user_name                    =>              'customer-service@.........',
                :password                      =>              'TdX2YR_V9Ifgx4CoLfF…

PUSH CODE ON HEROKU

How to push code on Heroku:- I give some steps , we can easily deploy the project on Heroku :- Firstly, we have to generate the ssh-keys:-ssh-keygen
     ssh-add
Then login on heroku account using command line:- heroku login
If we don't have install the heroku then we have to install the heroku using:- gem install heroku
     heroku login
Add the keys on heroku:-     heroku keys:add
Create the application on heroku:-     heroku create project-graph
Initialize the project using :-     git init
Add the remote:-git remote -v
     git remote add heroku https://git.heroku.com/project-graph.git
     git remote -v

Commit the project:-     git commit -a -m "Project graph"
Push the project on Heroku:-     git push heroku master
Then run the migration on heroku we don't have to run the rake db:create command for heroku. We only need to run :-     heroku run rake db:migrate
Then Compile the css and js files :-     rake assets:precompile