Tuesday, February 19, 2013

An error occurred while installing pg (0.14.1), and Bundler cannot continue

Using 'pg' gem and getting mentioned error?

Grab these packages first:

sudo apt-get install postgresql
sudo apt-get install libpq-dev

Now Go for bundle or gem install pg

Monday, February 18, 2013

An error occurred while installing memcached (1.4.6), and Bundler cannot continue

Memcached needs following packages in order to install memcached gem.

Install the dependent packages:

apt-get install libmemcached-dev libsasl2-dev
apt-get install memcached

Now bundle or get it directly:

sudo gem install memcached –no-rdoc –no-ri


moin@haidar:~/workspace/kloud$ memcached -p 11211 &
[1] 29573
moin@haidar:~/workspace/kloud$ irb
1.9.3p385 :001 > require 'rubygems'
 => false 
1.9.3p385 :002 > require 'memcached'
 => true 
1.9.3p385 :003 >  $cache = Memcached.new("localhost:11211")
 => #, @options={:hash=>:fnv1_32, :no_block=>false, :noreply=>false, :distribution=>:consistent_ketama, :ketama_weighted=>true, :buffer_requests=>false, :cache_lookups=>true, :support_cas=>false, :tcp_nodelay=>false, :show_backtraces=>false, :retry_timeout=>30, :timeout=>0.25, :rcv_timeout=>0.25, :poll_timeout=>0.25, :connect_timeout=>4, :prefix_key=>"", :prefix_delimiter=>"", :hash_with_prefix_key=>true, :default_ttl=>604800, :default_weight=>8, :sort_hosts=>false, :auto_eject_hosts=>true, :server_failure_limit=>2, :verify_key=>true, :use_udp=>false, :binary_protocol=>false, :credentials=>nil, :experimental_features=>false, :exception_retry_limit=>5, :exceptions_to_retry=>[Memcached::ServerIsMarkedDead, Memcached::ATimeoutOccurred, Memcached::ConnectionBindFailure, Memcached::ConnectionFailure, Memcached::ConnectionSocketCreateFailure, Memcached::Failure, Memcached::MemoryAllocationFailure, Memcached::ReadFailure, Memcached::ServerEnd, Memcached::ServerError, Memcached::SystemError, Memcached::UnknownReadFailure, Memcached::WriteFailure, Memcached::SomeErrorsWereReported]}, @default_ttl=604800, @not_found=#, @not_stored=#
1.9.3p385 :004 > target = {:first => 'Moin', :last => 'Haidar'}
 => {:first=>"Moin", :last=>"Haidar"} 
1.9.3p385 :010 > $cache.set 'test', target
 => nil 
1.9.3p385 :011 > $cache.get 'test'
 => {:first=>"Moin", :last=>"Haidar"}

Tuesday, February 12, 2013

Incompatible JavaHL library loaded. 1.7.x or later required

apt-add-repository ppa:dominik-stadler/subversion-1.7
apt-get update
apt-get dist-upgrade

Alt-Tab does not switch Ubuntu 12.04

Fin Compiz Confg Manager
sudo find / -name compizconfig-settings-manager

Not Found?

Install Compiz Config Settings Manager:
sudo apt-get install compizconfig-settings-manager

Then go to system tools > preferences > Compiz Config Manager
Select "Window Management Tab"
Check on "Application Switcher"

That's It.