Logo

Who is talking?

Archive

2014 in review

over 2 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog. Here’s an excerpt: A New York City subway train holds 1,200 people. This blog was viewed about 7,600 times in 2014. If it were a NYC subway train, it would take about 6 trips to carry that many people. Click here to […]

GIT Workflow that Works …. worked for me!

over 2 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

Before I jump to that actual article I want to make sure that we are on the same page as far as the objectives are concerned. Its important because, if the objectives are not clear, the strategy that worked for me, may not work for you. So, here is what I always wanted for my […]

5 reasons to use AngularJS in the corporate app world

about 4 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

5 reasons to use AngularJS in the corporate app world.

Segmentation fault : Ruby 1.9.3-p125 and RVM

over 5 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

This problem is not something that is specific to the version of ruby that you are using. It just comes with RVM, at least that is what I have observed since I started using RVM to manage different ruby version on my MacBook. Now, the reason behind this problem is the SSL or OPENSSL that […]

Dynamically added fields using ajax do not get posted on form submission (FORM inside TABLE)

over 6 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

This is a problem which is actually not a problem if we are following right semantics of HTML. Problem: I faced this problem where in after a page is loaded I have to add certain input html elements in the form (which I had inside a table) using ajax. Only the elements that were loaded […]

Rails Fixtures load order

over 6 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

This was a head breaking experience for me recently. We all know that the fixtures files in rails load by default in alphabetical order. And the records inside every single file again load in alphabetical order (not from top to bottom as you define in the fixture file). Considering that having database level constraints (foreign […]

`bin_path’: can’t find executable rake for rake-0.8.7 (Gem::Exception)

over 6 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

Well after a long time, I finally had to shift back to ROR development on Windows. I am running on Windows Vista, Rails 3, ruby 1.9.2. Things are not all that bad on windows, or at least, not as much as I thought they might be. But, we definitely keep on facing problems here and […]

Configuring delayed_job 2.x

over 6 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

I was configuring the delayed job and I got problems like : `method_missing_without_paginate': undefined method `destroy_failed_jobs=’ This is because I have 2.0.3 version of delayed job… The configuration parameters have all been moved to Delayed::Worker now and thus the following works for version 2.x: Delayed::Worker.destroy_failed_jobs = false Delayed::Worker.sleep_delay = 60 Delayed::Worker.max_attempts = 3 Delayed::Worker.max_run_time = […]

Awesome date time plugin

almost 7 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

After a long time, I have seen such a great datetime picker for rails. “Awesome” is just not the word for it :D

Ruby Class with Mass assignable attributes

almost 7 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

Well, this is very weired again, but it seems ruby class does not allow me to have mass assignable attributes as you could do with the ActiveRecord models using attr_accessible or attr_accessor. Its very painful to have too many getters and setters in the class and to assign them manually when you create an object […]

no such file to load — capistrano-ext

almost 7 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

If you are using capistrano and capistrano-ext together, please note that the following line in you environment.rb might not be sufficient: config.gem “capistrano” config.gem ‘capistrano-ext’ In this case, you might get the error : no such file to load — capistrano-ext bla-bla-bla All you need for your app to find the gem (I am assuming […]

Mocha should be loaded after Shoulda with rails 2.3

almost 7 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

Well, this one really drove me crazy. So I decided to finally pen it down. May this help somebody else in future. This might not be very new, but really crazy stuff. If you are using Mocha and Shoulda both, then please load Mocha after you have loaded Shoulda. Like following: config.gem “shoulda”, :lib => […]

class_eval and instance_eval

about 8 years ago | Sanjeev Mishra: Sanjeev Mishra's Blog

Hey guys this is the most amazing and funny thing I have learnt in my life time. I started laughing like anything when I learnt how this behaves and things started going over my head for some time Then I happened to watch Dave Thomas’s video on metaprogramming as many as thrice to really sink […]