Skip to content

Instantly share code, notes, and snippets.

View mohitsethi's full-sized avatar
🎯
Focusing

Mohit Sethi mohitsethi

🎯
Focusing
View GitHub Profile
@mohitsethi
mohitsethi / gist:2984535
Created June 24, 2012 19:16
cannot load such file -- rubygems_bundler/rubygems_bundler_installer (LoadError)
mohit@ubuntu$ gem install rci-0.0.1.gem
Error loading RubyGems plugin "/home/mohit/.rvm/gems/ruby-1.9.3-p194/gems/rubygems-bundler-0.2.8/lib/rubygems_plugin.rb": cannot load such file -- rubygems_bundler/rubygems_bundler_installer (LoadError)
Successfully installed rci-0.0.1
1 gem installed
mohit@ubuntu$ rvm -v
rvm 1.14.1 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
@mohitsethi
mohitsethi / gist:3224965
Created August 1, 2012 08:24
Knife unable to locate bootstrap template.
DEBUG: Using configuration from /home/mohit/Ubuntu One/chef/repos/mohitsethi/test/chef-clgn/chef-repo/.chef/knife.rb
Bootstrapping Chef on 23.22.20.136
DEBUG: Looking for bootstrap template in /home/mohit/.rvm/gems/ruby-1.9.3-p194/gems/chef-10.12.0/lib/chef/knife/bootstrap
DEBUG: Looking for bootstrap template in /home/mohit/Ubuntu One/chef/repos/mohitsethi/test/chef-clgn/chef-repo/.chef/bootstrap
DEBUG: Looking for bootstrap template in /home/mohit/.chef/bootstrap
Can not find bootstrap definition for ubuntu12.04-gems.mine.erb
/home/mohit/.rvm/gems/ruby-1.9.3-p194/gems/chef-10.12.0/lib/chef/knife/bootstrap.rb:142:in `load_template': No such file or directory (Errno::ENOENT)
from /home/mohit/.rvm/gems/ruby-1.9.3-p194/gems/chef-10.12.0/lib/chef/knife/bootstrap.rb:210:in `ssh_command'
from /home/mohit/.rvm/gems/ruby-1.9.3-p194/gems/chef-10.12.0/lib/chef/knife/bootstrap.rb:190:in `knife_ssh'
from /home/mohit/.rvm/gems/ruby-1.9.3-p194/gems/chef-10.12.0/lib/chef/knife/bootstrap.rb:167:in `run'
@mohitsethi
mohitsethi / gist:3271866
Created August 6, 2012 07:15
oniguruma
Installing oniguruma (1.1.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/mohit/.rvm/rubies/ruby-1.8.7-p370/bin/ruby extconf.rb
checking for main() in -lonig... no
creating Makefile
make
gcc -I. -I. -I/home/mohit/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/x86_64-linux -I. -fPIC -Wall -c oregexp.c
oregexp.c:2:23: fatal error: oniguruma.h: No such file or directory
@mohitsethi
mohitsethi / gist:3293848
Created August 8, 2012 09:48
mysql: symbol lookup error
mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol:
@mohitsethi
mohitsethi / lxc.rb
Created November 19, 2012 10:59 — forked from osiloke/lxc.rb
Setup an lxc-container (chef recipe)
package 'debootstrap'
package 'apt-cacher-ng'
package 'inotify-tools'
include_recipe 'lxc::manage'
include_recipe 'lxc::network_bridge'
include_recipe 'lxc::dns'
host = node[:container]
@mohitsethi
mohitsethi / gist:5387418
Created April 15, 2013 11:20
vsphere-test
#!/usr/bin/env ruby
require 'rubygems'
require 'pp'
require 'fog'
require 'highline/import'
def get_password(prompt="Enter password:")
ask(prompt) {|q| q.echo = false}
end
jekyll
@mohitsethi
mohitsethi / gist:5453636
Created April 24, 2013 16:48
coderwall
{% if site.coderwall_user %}
<section class="well">
<ul class="nav">
<li class="nav-header">Coderwall Badges</li>
</ul>
<div id="coderwall_badges"></div>
<a href="http://coderwall.com/{{site.coderwall_user}}">@{{site.coderwall_user}}</a> on coderwall
<script type="text/javascript">
$(document).ready(function(){
$.getJSON("http://coderwall.com/{{site.coderwall_user}}.json?callback=?", function(data){
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]
@mohitsethi
mohitsethi / gist:6421062
Created September 3, 2013 08:21
Chef run, postgresql cookbook version 3.0.3
[2013-09-03T08:11:41+00:00] INFO: *** Chef 11.4.0 ***
[2013-09-03T08:11:42+00:00] INFO: Setting the run_list to ["role[base]", "recipe[postgresql::server]", "recipe[postgresql::ruby]"] from JSON
[2013-09-03T08:11:42+00:00] INFO: Run List is [role[base], recipe[postgresql::server], recipe[postgresql::ruby]]
[2013-09-03T08:11:42+00:00] INFO: Run List expands to [build-essential, python, git, vim, postgresql::server, postgresql::ruby]
[2013-09-03T08:11:42+00:00] INFO: Starting Chef Run for cook-3490
[2013-09-03T08:11:42+00:00] INFO: Running start handlers
[2013-09-03T08:11:42+00:00] INFO: Start handlers complete.
[2013-09-03T08:11:43+00:00] INFO: Processing package[postgresql-devel] action install (postgresql::client line 32)
[2013-09-03T08:11:52+00:00] INFO: Processing chef_gem[pg] action install (postgresql::ruby line 59)
[2013-09-03T08:12:16+00:00] INFO: Processing package[gcc] action install (build-essential::default line 51)