Thursday, August 18, 2016

My Civic and some very stubbron vibarations issues

Hello friends,

Its been long time that i posted something here and this time i won't even say was lazy.. lately been facing a few of blows on personal front and life has not been the way it was to me since last post, but all that can come in picture may be in a different post altogether. Lets talk about civic here, my Black 2007 Honda Civic.

That sweetie has been one hell of a car. Believe me i have not driven super cars yet but whatever that have driven this one is a very sweet machine, from racing one traffic light to other... to cutting corners... to driving 150 to 210+ km/h... to listening melodies in rainy days or some time just talking to her it has been very good in fact i will say great car to me.

But as with almost everything wear-tear happens and my car is no different.. Many of you don't know but at the start of this year Civic met with bad accident on road, hitting a feet height pavement at 150+ km/h from front and the impact was such that right side alloy wheels turned into pieces suspension assembly broke at rear and after all this all four in the car walked out and the first statement i heard from one of my friends (to other) "Good morning" (he was sleeping while crash happened)(can elaborate more but thats not the aim here)

And from that day onwards something or the other kept on bothering me from cars perspective too(because some very personal stuff were also bothering me). Got the damaged parts replaced got her set of 4 + 1 brand new Michelin Agnis tyres but it was not the same car, i think...

There was this sound something like humming from right front wheel, was vibrating steer at 90+ km/h confidence of breaking was not there.. always kept thinking that it might just leave the road again and this time may be i will not get the chance also to walk away.

Took it to local garage and after quite a few test drives was able to convince the person that it must be the right wheel bearing.. He was quite skeptical but on my insist he replaced it, that was around Rs 1400.00 +  Rs 200 for the press machine and Rs 500 as labor charges. Result: humming sound went away. I thought finally things are getting normal with my sweetie but no i was wrong.

Vibrating steering issue become more and more prominent and it was like Praveen why can't you send me to Honda service center(HSC) and get me fixed.. am i not good enough for you now to ask for proper authorized service center visit but service center guys were more lame than me.. as per them things are quite ok and they can't figure out whats the reason behind vibration and gave the car back... I kept the car running like that and lately it started making noise while braking as if something is hitting the brake disc rotors and the cycle begins again.

As per my local garage may be suspension bushes or the rotors must have gone wrong.. they replaced the bushes and got the disc cleaned on lathe machine but that thing was so stubborn to go away. Between all these I saw one very strange thing... what the local mechanic did is that he jacked my car from front right so that front right tyre is completely off the ground.. took the tyre off and started the car (switched to Drive mode) brake disc was hitting the brake caliper pins while rotating in an alternate fashion, which he ignored but i didn't .. i asked him to get this disc also removed and see of that hub is also doing this behavior (as per him this is not that abnormal) but upon my forced request he had to do it and there i saw that the hub was also showing wave behavior but as they has changed that hub's bearing only a month back so they don't want to take the blame if bearing or hub has gone wrong but kept insisting that it must be disc only and they will re-put that on lathe machine and get it fixed but i was pretty sure the culprit is the hub.

To be very sure, took it to Honda Service Center(HSC) again and elaborated the problem over phone (as driver has picked it to HSC) as i was not physically present there but again they were not able to figure out the issue. Even though i was so precise explaining about hub and its bearing (would be the culprit and how to confirm it...) they just can't get to it and my car came back with interior cleaned along with leather polishing on seats and nothing much but at least they were frank in telling me that they were not able to get to crux of the problem and hence its not fixed as of now.

And day before yesterday took it to Palika Bhawan, RK Puram, New Delhi (opposite to Hotel Hayat) and explained the problem and asked the mechanic to do the same exact steps and then it will become clear.. At least this time they listened because i think they didn't had any thing to loose and neither to take blame of some kind and finalized on yes its the hub (and if worst case may the axle), but as the hub(with bearing) is a thing which rarely gets any damage is generally not available with any store there. Now what do i need to do, wait or could i ask Honda to get me one but both things will take time.

One among those mechanics came up with the idea of why not get it fixed it on lathe machine while rubbing of the extra dent (which is not visible from naked eye) this way even if there is a slight dent on hub wheel it will not be propagating that on the brake disc plate(rotor) (because its directly mounted on that) after some negotiations i agreed.

They took it and came back in 40 min.. hub was looking shiny from the front as they have grinned for that uneven surface and rest was exactly the same. Keeping fingers crossed they put the things together which is not that tough but mind you not very easy too and its very laborious.

Took the test drive and it seemed to work... there was no vibration on steering and it was not screaming while breaking too.. on a safer note got all the tires balanced and aligned too and even though has not taken it for any long rides yet but initial observations are very satisfying (Total cost: Rs 3500.00 including labor charges) and also for the first time i got my civic a new accessory the "steering wheel" cover.. it is very much well stitched and finished have a look.

@ Rs 2200.00 What you say?

Monday, November 30, 2015

Fixed: Rubymine hanging in Ubuntu 15.XX after upgrade

Ahaa Hello folks,

From last two days people in my company using RubyMine were going nuts with their development machine set-up. Initially I was ignorant thinking it must be small niggles or crazy stuff folks do to their systems resulting in problems like these but then why and how it is happening to almost all of them?? 

Clueless how come all of sudden all installations(including mine) started freezing on specific type of window open(generally suggestion dialogs) then one of them figured out it must be a Ubuntu software update which must be poking with RubyMine ahha GOTCHA!!

So we figured out people who all have not taken the latest update on Ubuntu 15.xx were doing fine while others are unfortunately unlucky enough and then we kind of figured out its the java in system that’s making things nasty and not going well with RubyMine. Initially there was nothing as solution available and then no one was even bothered but after two day found something and as "misery loves company" got some relief as it got raised here like

But then what's the solution.. here it is

First of all 
Step 01: Keep everything intact but remove all java installations from your ubuntu like java-common, default or open jdk/jre. (I use Synaptic package manager, un-ticked them and removed all of it)
Step 02: Restart once done with Step 01.
Step 03: Add Oracle Java to your system. Open a terminal and add webupd8 ppa with following commands
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
Step 04: Install oracle-java8-installer and setup Java 8 as default (JAVA_HOME, PATH, etc.) (again I used Synaptic package manager for that :)

and Whola!! its working sweet :) I hope it helps others too.

Friday, July 3, 2015

Mousewheel event not working in safari within iframe


So a new strange issue that went live, while implementing a iframe window with a mousewheel handler stopped working in safari (mac).
And it was very strange because it was working on webkit browsers (like chrome) and other browsers perfectly fine.

And to be precise, was using it says

"A jQuery plugin that adds cross-browser mouse wheel support with delta normalization."

then why it is not working in safari for me.

Then collected my thoughts and found that it is working as such in safari but completely switching off when served inside an iframe in safari, so googled a bit and found which is kind of an open debate/bug whether it should work or not but in a nutshell the things that made it work was


yes as such this piece of code does nothing significant but somehow it passes scroll event from main window to pertaining iframe (in safari) and it make is work :)

there is one more solution and that is to

Open the Safari dev tools and run the following code:
  var f = function() {};
  document.addEventListener("mousewheel", f);
  document.removeEventListener("mousewheel", f);

But haven't given that a try

Thursday, January 15, 2015

Error installing rb-gsl gem on ubuntu

While installing rb-gsl gem on my gemset from ruby 2.1.0 got an error trailed like below

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/praveen/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150115-4389-1qh8ghv.rb extconf.rb
extconf.rb:6: warning: Insecure world writable dir /opt/android-sdk in PATH, mode 040777
*** ERROR: missing required library to compile this module: No such file or directory - gsl-config
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:

extconf failed, exit code 1

Gem files will remain installed in /home/praveen/.rvm/gems/ruby-2.1.5/gems/rb-gsl- for inspection.
Results logged to /home/praveen/.rvm/gems/ruby-2.1.5/extensions/x86_64-linux/2.1.0/rb-gsl-

there is one system dependency that is required to pursue further in ubuntu install libgsl0-dev package, install it like..
sudo apt-get install libgsl0-dev
That's it now retry installing rb-gsl gem.. it worked for me :)

Monday, January 5, 2015

How to access rails application routes in rails models

With the newer version of rails, application itself is an engine which is the initialized format of abstract class Rails::Application and to access routes of any (host) engine the code is

SomeRailsApplicationName::Application.routes.url_helpers.named_route_path(parameter: 'something')

and for a (mountable) engine the code is

SomeMountableEngineName::Engine.routes.url_helpers.named_route_path(parameter: 'something'


rails console > Helloworld::Application.routes.url_helpers.about_path
 => "/about"

rails console > BambooUser::Engine.routes.url_helpers.login_path
 => "/users/login"

Saturday, December 13, 2014

Error installing nokogiri gem in ubuntu: Solved

If something resembling below is the output of nokogiri gem install in ubuntu 14.10 or so

/home/praveen/.rvm/rubies/ruby-2.1.0/bin/ruby -r ./siteconf20141213-9698-1nhm3s1.rb extconf.rb
Building nokogiri using packaged libraries.
checking for iconv.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
/home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
    from /home/praveen/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/mkmf.rb:1066:in `have_header'
    from extconf.rb:103:in `have_iconv?'
    from extconf.rb:148:in `block (2 levels) in iconv_prefix'
    from extconf.rb:90:in `preserving_globals'
    from extconf.rb:143:in `block in iconv_prefix'
    from extconf.rb:120:in `each_iconv_idir'
    from extconf.rb:137:in `iconv_prefix'
    from extconf.rb:428:in `block in

    from extconf.rb:161:in `block in process_recipe'
    from extconf.rb:154:in `tap'
    from extconf.rb:154:in `process_recipe'
    from extconf.rb:423:in `

extconf failed, exit code 1

Install libgmp-dev package with command
sudo apt-get install libgmp-dev

That should solve the problem

Saturday, July 26, 2014

Amazon VPC's NAT not doing its job! SOLVED


If you have ever bumped into this situation where a good chap VPC from Amazon is at your help and as per expectation NAT machine in Public subnet is not able to route traffic (even if all the security group and NAT rules are in place) and worst, no one has posted anything on this.. then you are at my situation :)

What i have done seems all correct. Am able to ssh in NAT and also able to log into destination instances(ssh-ing them from NAT), NAT rules even though all look good syntacticly and as per the requirement, is not working at all.

So what i have done wrong? Here is the answer

Was trying to make a typical Scenario 1 VPC on amazon and with the help of NAT machine was trying to forward traffic on other two instances (available in public subnet itself) so that can save myself on buying EIPs for instances created (Trying to be [over]smart).

To laugh back on me Amazon has made all proper arrangements and this is what they say
We use the term NAT instance; however, the primary role of a NAT instance is actually port address translation (PAT). We chose to use the more widely known term, NAT. For more information about NAT and PAT, see the Wikipedia article about network address translation.

The main route table sends the traffic from the instances in the private subnet to the NAT instance in the public subnet. The NAT instance sends the traffic to the Internet gateway for the VPC. The traffic is attributed to the Elastic IP address of the NAT instance. The NAT instance specifies a high port number for the response; if a response comes back, the NAT instance sends it to an instance in the private subnet based on the port number for the response.  

So in a nutshell a NAT machine(in Amazon VPC) can work (of routing traffic) as per expectation if only the instances its connecting-to, is in private subnet and not in public subnet.

If it helped you anywhere am glad (am not the only one)