Sunday, 28 February 2016

Installing nokogiri on Mac without xcode

brew install libxml2
bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
bundle install

Sunday, 3 January 2016

Debug Ember test

Use pauseTest to pause test and check application state while testing.

return pauseTest()



See http://emberjs.com/api/classes/Ember.Test.html#method_pauseTest for more info.

Tuesday, 29 December 2015

PG::ConnectionBad , could not connect to server

Problem:


PG::ConnectionBad (could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
):


Solution:

Remove postmater pid

Command

rm /usr/local/var/postgres/postmaster.pid

Friday, 17 April 2015

Install npm package from Github

To install ember-cli-simple-auth-torii from Github

` npm install  --save--save git+ssh://git@github.com/simplabs/ember-cli-simple-auth-torii `

Sunday, 17 August 2014

Sync Unix machines using Rsync and Cron job

In Ruby, write cron jobs using  whenever gem .

In schedule.rb file write:

every 1.day, at: '11pm' do
  command "rsync -az --delete file_path_to_sync/ Ip_address_of_destination:/file_path"
end

we will need to login remote server without password

  • Create public and private keys 

  • ssh-keygen
  • Copy the public key to remote-host

  • ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
More details

Tuesday, 29 July 2014

Debug Capybara test


Console log your variables , and to pause capybara test, use

STDIN.getc

after checking variables, press any key to continue test cases