Skip to main content

Posts

Resolve OpenSSL::SSL::SSLError on Yosemite

If you are using rvm installed ruby on Yosemite  OSX  and getting error : OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed then reinstalling ruby with ` --disable-binary` may fix this Issue. rvm reinstall 2.1.2 --disable-binary  Reason: Ruby installed with packaged binary in rvm has OpenSSL path: /etc/openssl  Path of installed openssl is :  /usr/local/etc/openssl To check openssl directory: > irb > require 'openssl' > "SSL_CERT_DIR: %s" % OpenSSL::X509::DEFAULT_CERT_DIR

Deploying Ember Cli App

Now deploying ember-cli is no more a challenge,  ember-cli-deploy  Addon is good solution for deploying ember-cli apps but why settle for good solution when you have awesome solution out there . Yes, you read it right. Thanks  tedconf  for building front_end_builds  and  ember-cli-front-end-builds  . Front_end_builds : Rails engine to manage front end builds and deployments Benefits: JS app can be deployed without redeploying your Rails app Easily smoke test SHAs, branches and releases in your production environment with query params:  http://your-app.com/my-ember-app?branch=new-feature Admin interface lets you easily view, rollback and activate different app versions Admin UI look like this : Ember-cli-front-end-builds:  Easily deploy your Ember CLI app to a  front_end_builds  Rails backend. The deploy process involves: Creating a build of your ember-cli app Uploading your assets to S3 ...

Add handlebar helpers in ember cli project

Updated for ember-cli 1.13.8 To add handlebar helper, create file under 'app/helpers/' directory If your helper name is 'if-first' than your file will be like 'app/helpers/if-first.js' Remember to use dash in helper name so that it will be loaded automatically, for more info read  http://www.ember-cli.com/#resolving-handlebars-helpers . Example: Check for first element in each loop. 'app/helpers/if-first.js' import Ember from "ember" export default Ember.Helper.helper(function(options)  {  if(options[0] === 0){     return options[1];   }else{     return options[2];   } };     then use it in your handlebars template {{#each items as |item index|}}   <div class={{if-first index "active item" "item"}}>            </div> {{/each}}   You can also pass  parameter to helpers like:  {{#format-date date}}  and collect...

Letter To Ruby Conf India Organisers

Disclaimer : This article consist of my brutally honest review about Ruby Conf India 2015, If you are prone to depression, heart attack while reading criticism, please STOP reading this letter now  and move on. I know organizers worked hard to organize this event and I thank you for that but this does not mean I am happy with the way it was organised. I have complaints, so do lots of people I know. Someone has to raise voice, for now I am taking this responsibility. 1. Why Discriminate ? I was given accommodation in Justa-panjim while most of the conf attendees were in Cidade-goa, those two hotel are incomparable. Justa-panjim didn't have enough water for bathing, forget about swimming pool, beach. I didn't had complained if everyone was given accommodation in Justa-panjim, Yes I am being jealous here..!!! I paid conf fees(lite tickets.. yes thats how early I booked my ticket.) and I deserve to be treated equally , why discriminate ? 2. Where's Ruby ? In some o...

Ember data load model using findQuery

Loading Ember model in route is as simple as: App.PostsRoute = Ember.Route.extend({   model : function (params) {      return this .store.find( ' post ', params.post_id );   } }); But when loading model using findQuery then App.PostsRoute = Ember.Route.extend({   model :  function (params) {      return   this .store.find( ' person , {name: params.username} ).then(function(result){         return result.get('firstObject')      });   } }); findQuery return Array therefore select firstObject from Array, Remember to return Array from api for '/persons?name=test_name' url.

The Bidder Journey

It was time for another Rails Rumble event, and I was looking for Ideas what to build.  Through one of coding competition I came across a problem in which you have to write a algorithm to outbid computer. I am (always been ) fan of Computer Games, so I thought why not build a Game based on this problem. Rails Rumble is a 48 hrs coding competition in which you have to build one Rails application. At this point, I knew what to build and which framework to use, but I didn't knew how to built it or even its possible in Rails, so I presented my Idea in Open Source Friday  .  I dry run my Idea on white board and played  a demo with Gautam Rege ( @ gautamrege ) on white board. People liked the Idea, and suggested how it can be done. Sanjiv Jha got interested in this game and joined me in the journey. The day of competition arrived 19 Oct 2013. Sanjiv and I coded 2 days , Stack used in Bidder is Ruby 2, Rails 4, Bootstrap 2.3, jquery 1.9, we used  ...