<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Open Source</title><description>Information/News about Open Source software projects and programs</description><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><pubDate>Mon, 7 Oct 2024 17:05:41 +1100</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">217</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://about-opensource.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Information/News about Open Source software projects and programs</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>How to install rbenv and Ruby build</title><link>http://about-opensource.blogspot.com/2018/03/how-to-install-rbenv-and-ruby-build.html</link><category>rbenv</category><category>Ruby</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 16 Mar 2018 22:31:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-5145489424516872866</guid><description>&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;a href="https://github.com/rbenv/rbenv"&gt;rbenv&lt;/a&gt; use to setup different ruby environment based on your application, it's a nifty tool for development environment especially if your working different Ruby applications.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;Installing instruction for rbenv&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;$ brew install rbenv&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;Add rbenv's bin path into .rc(.bash_profile) file&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;export PATH="$HOME/.rbenv/bin:$PATH" &lt;br /&gt;if which rbenv &amp;gt; /dev/null; then eval "$(rbenv init -)"; fi&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;Make sure you have reloaded terminal with env changes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;Installing specific Ruby version Ex. 2.3.4&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;$ rbenv install 2.3.4&lt;br /&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;span class="s1"&gt;ruby-build: use openssl from homebrew&lt;br /&gt;Downloading ruby-2.3.4.tar.bz2...&lt;br /&gt;-&amp;gt; https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.3.4.tar.bz2&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;span style="font-variant-ligatures: no-common-ligatures;"&gt;Installing ruby-2.3.4...&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;span style="font-variant-ligatures: no-common-ligatures;"&gt;Installed ruby-2.3.4 to /Users/home/.rbenv/versions/2.3.4&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;Make your Ruby 2.3.4 as global&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;$ rbenv global 2.3.4&lt;br /&gt;$ ruby -v&lt;br /&gt;ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin17]&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;Sets the global version of Ruby to be used in all shells by writing the version name to the ~/.rbenv/version file. This version can be overridden by an application-specific .ruby-version file, or by setting the RBENV_VERSION environment variable.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Install ZSH and Oh My Zsh on your Mac</title><link>http://about-opensource.blogspot.com/2018/03/install-zsh-and-oh-my-zsh-on-your-mac.html</link><category>brew</category><category>zsh</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 16 Mar 2018 21:07:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-3276121176595611187</guid><description>&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;In order to Install zsh on your mac, make sure you've installed Homebrew on your machine. Homebrew is a package manger for macOS and very handy tool to install any packages on your mac.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;If you haven't installed&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;Homebrew, have a look &lt;a href="http://brew.sh/"&gt;http://brew.sh&lt;/a&gt; and follow the install instructions.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;Installing ZSH&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;$ brew install zsh&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;This command will install zsh on your machine&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;Oh My Zsh&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;It's a framework for managing your ZSH configuration and more than 200+ plugins. would recommend&amp;nbsp;to try this.Visit &lt;a href="http://ohmyz.sh/"&gt;http://ohmyz.sh&lt;/a&gt; and follow the install instructions&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;You can install any kind of plugins such as github&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Design Patterns - Singleton</title><link>http://about-opensource.blogspot.com/2018/02/design-patterns-singleton.html</link><category>Design Patterns</category><category>Ruby</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 26 Feb 2018 20:39:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-2137927920275926506</guid><description>&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;Singleton pattern is frequently used to provide global access point for a service. It restricts instantiation of a class to only one instance that globally available.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;It's useful in your application when you need global instance which can be accessible in different parts of the application. Most common use case of this pattern is Application logging and configuration functionality.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;Singleton pattern in Ruby&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;Class Logger&lt;br /&gt;  def initialize&lt;br /&gt;    @log = File.open("/tmp/tmp.log", "a")&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  @@instance = Logger.new&lt;br /&gt;&lt;br /&gt;  def self.instance&lt;br /&gt;    @@instance&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def log(message)&lt;br /&gt;    @log.puts(message)&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  private_method :new&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Logger.instance.log("Log me")&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;In this example, we created an instance of the "Class Logger" which can be accessed by class method "Logger.instance", so when you want to log any errors/warning/notice on your app, you can simply use "log" instance method which just opened a log file and appending message on that file.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;&amp;nbsp;At the end of the class we made method "new" as private, so that anywhere in the application we can't create new instance of Class "Logger"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Ruby PRY </title><link>http://about-opensource.blogspot.com/2018/01/ruby-pry.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 19 Jan 2018 22:17:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-8536882193260858663</guid><description>&lt;span style="font-family: Verdana, sans-serif;"&gt;Pry is one of the great tool for debugging ruby based application. In this blog would like to show some of the cool features of the Pry.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Ruby - Array#bsearch </title><link>http://about-opensource.blogspot.com/2018/01/ruby-arraybsearch.html</link><category>binary search</category><category>Ruby</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 19 Jan 2018 22:01:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-7585151575324140371</guid><description>&lt;span style="font-size: large;"&gt;Array bsearch it's very handy and one of the fastest way to find a value from the array.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: large;"&gt;Let's do benchmark analysis, based on the result, bsearch more powerful than using array find method.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;require 'benchmark'&lt;br /&gt;&lt;br /&gt;array_data = (0..100_000_000)&lt;br /&gt;&lt;br /&gt;Benchmark.bm do |x|&lt;br /&gt;  x.report(:find) { array_data.find {|number| number &amp;gt; 50_000_000 } }&lt;br /&gt;  x.report(:bsearch) { array_data.bsearch {|number| number &amp;gt; 50_000_000 } }&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;user     system      total        real&lt;br /&gt;find  3.160000   0.000000   3.160000 (  3.174570)&lt;br /&gt;bsearch  0.000000   0.000000   0.000000 (  0.000011)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;It can find a match with only O(log n) complexity.&amp;nbsp;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Node.js Best Practices - Async</title><link>http://about-opensource.blogspot.com/2017/10/nodejs-best-practices-async.html</link><category>async/await</category><category>Best Practices</category><category>JavaScript</category><category>Node.js</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 31 Oct 2017 21:14:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-3544443897570262194</guid><description>&lt;span style="font-family: &amp;quot;verdana&amp;quot; , sans-serif;"&gt;Async function allows you to write Promise based code as if it were synchronous. It was shipped with V8 Engine since the Version 7.6.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;verdana&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;verdana&amp;quot; , sans-serif;"&gt;Define a function using the async keyword, then you can use the await keyword within the function's body.&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;async function app () {&lt;br /&gt;  ...&lt;br /&gt;  await ...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;Async function is called, it returns with a Promise. When it returns a value, the promise gets fulfilled.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;Async function throws an error, if it's rejected&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;Simple Async function&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;const util = require('util')&lt;br /&gt;const {file} = require('fs')&lt;br /&gt;const fileAsync = util.promisify(readFile)&lt;br /&gt;async function app () {&lt;br /&gt;  const content = await fileAsync('log')&lt;br /&gt;  return content&lt;br /&gt;}&lt;br /&gt;app()&lt;br /&gt;  .then(console.log)&lt;br /&gt;  .catch(console.error)&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;If your applications are using Promise, then you can use "await" your Promises, instead of chaining them.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;Above example leverage Promise using Node.js build-in "util.promisify" and read the file asynchronously.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;Promise Reject/Error Handling&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;In the newer version of Node.js, if Promise gets rejected it will bubble down to the Node.js process. Make sure you handled the "try-catch" block properly on your app.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;/span&gt; &lt;br /&gt;&lt;pre style="background-color: black; color: white; font-family: menlo, monaco, 'courier new', courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;const util = require('util')&lt;br /&gt;async function app () {&lt;br /&gt;  try {&lt;br /&gt;    await new Promise((resolve, reject) =&amp;gt; {&lt;br /&gt;      reject(new Error('error'))&lt;br /&gt;    }) &lt;br /&gt;  } catch (err) {&lt;br /&gt;    // handle the error&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;app()&lt;br /&gt;  .then(console.log)&lt;br /&gt;  .catch(console.error)&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Debugging Node.js application</title><link>http://about-opensource.blogspot.com/2017/10/debugging-nodejs-application.html</link><category>Debugging</category><category>JavaScript</category><category>Node.js</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 24 Oct 2017 21:36:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-690362968252299271</guid><description>&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;Debugging Node.js app is always fun, especially if you're coming from other language background such as Ruby, Python. you may looking similar debugger(binding.pry or pdb) on node js world.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;In this article, let me go through how debugging node.js app with Chrome DevTool&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;&lt;b&gt;1. Install Node.js, i use nvm&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0); color: white; font-family: menlo, monaco, &amp;quot;courier new&amp;quot;, courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;&lt;span class="markup--strong markup--pre-strong" style="font-weight: 700;"&gt;$ nvm use v8.7.0&lt;/span&gt;&lt;br /&gt;&lt;span class="markup--strong markup--pre-strong" style="font-weight: 700;"&gt;Now using node v8.7.0 (npm v5.4.2)&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;&lt;b&gt;2. To start debugging mode, run the Node.js app with inspect flag&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0); color: white; font-family: menlo, monaco, &amp;quot;courier new&amp;quot;, courier, monospace; font-size: 16px; margin-top: 13px; overflow: auto; padding: 20px; white-space: pre-wrap;"&gt;&lt;span class="markup--strong markup--pre-strong" style="font-weight: 700;"&gt;node-app $ node --inspect index.js&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="s1"&gt;Debugger listening on ws://127.0.0.1:9229/a51c84e5-78c1-481e-ac5b-ab6bc78c23fe&lt;/span&gt;&lt;br /&gt;&lt;span class="s1"&gt;For help see https://nodejs.org/en/docs/inspector&lt;/span&gt;&lt;br /&gt;&lt;span class="s1"&gt;Debugger attached&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;&lt;b&gt;3. Open Chrome inspector and click on "&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Open dedicated DevTools for Node" to debug your app code&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;img border="0" data-original-height="594" data-original-width="1276" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg8dm51XQl17hmUNktEJ_w2_g1LActWHRstM5bhRwTEL1mRx_idh1Wonxq9WMnM-SDtXZ_mzAOZGpi8YuBVTNS1ONnnq9gHd8hh1Uwd_6ABxOUige2Z4wslaaCmNxEoiiaf3bLXNs12UE/s400/Screen+Shot+2017-10-24+at+9.17.09+pm.png" width="400" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;Now you can debug your javascript code by adding breakpoint or "debugger"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgmAndLED2HnJxaTJ9KrZop7cEwgPJXriSfXoJUKqxWXyzK7Z2XisvyL-pPIKO51qnKmS0f_hjGQYOqiad6fgKJXReHsfShRmVpU6RQk9C1xgUH486O9XiZRM5NFNBDuwu8E0pAqECzGE/s1600/Screen+Shot+2017-10-24+at+9.23.59+pm.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="583" data-original-width="1600" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgmAndLED2HnJxaTJ9KrZop7cEwgPJXriSfXoJUKqxWXyzK7Z2XisvyL-pPIKO51qnKmS0f_hjGQYOqiad6fgKJXReHsfShRmVpU6RQk9C1xgUH486O9XiZRM5NFNBDuwu8E0pAqECzGE/s400/Screen+Shot+2017-10-24+at+9.23.59+pm.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;"&gt;Happy debugging :)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg8dm51XQl17hmUNktEJ_w2_g1LActWHRstM5bhRwTEL1mRx_idh1Wonxq9WMnM-SDtXZ_mzAOZGpi8YuBVTNS1ONnnq9gHd8hh1Uwd_6ABxOUige2Z4wslaaCmNxEoiiaf3bLXNs12UE/s72-c/Screen+Shot+2017-10-24+at+9.17.09+pm.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>TextMate bundle for remove space, add newline, etc</title><link>http://about-opensource.blogspot.com/2014/11/textmate-bundle.html</link><category>Bundler</category><category>TextMate</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 23 Nov 2014 22:07:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-7103012162411143019</guid><description>This is one of the useful bundle for TextMate which converts Tabs to Spaces, Remove Trailing Whitespace and Add a newline at end of file

&lt;a href="https://github.com/glennr/uber-glory-tmbundle"&gt;https://github.com/glennr/uber-glory-tmbundle&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Rails 4 - Scope</title><link>http://about-opensource.blogspot.com/2013/08/rails-4-scope.html</link><category>Block</category><category>Proc</category><category>Rails</category><category>Ruby</category><category>Ruby on Rails</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 21 Aug 2013 19:43:00 +1000</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-3939926764829754049</guid><description>In rails 4, scopes should take a proc object or a block. Take an example this User model&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;Class User &lt; ActiveRecord::Base
&amp;nbsp; attr_accessor :name,:age,:status

&amp;nbsp; def initialize(name, age)
&amp;nbsp; &amp;nbsp;&amp;nbsp;@name = name
&amp;nbsp; &amp;nbsp;&amp;nbsp;@age = age
&amp;nbsp; end
end
&lt;/pre&gt;
I would like to make default scope based on status 'user' and admin scope based on status 'admin'. In rails 3, I can make scope like this&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;#Rails 3
scope :admin, where(status: 'admin')
default_scope where(status: 'user')
&lt;/pre&gt;&lt;br /&gt;
Rails 4, I can make scope this way&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;#Rails 4
default_scope { where(status: 'user') } #  block
#default_scope -&gt;{ where(status: 'admin) } #Proc valid
scope :admin, -&gt;{ where(status: 'admin') }
&lt;/pre&gt;
If we try to use scope without(see rails3 examples) passing proc or block in Rails 4, it triggers DEPRECATION WARNING message.&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Rails 4 - Finders</title><link>http://about-opensource.blogspot.com/2013/08/rails-4-finders.html</link><category>Finders</category><category>Rails</category><category>Ruby</category><category>Ruby on Rails</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 21 Aug 2013 19:19:00 +1000</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-4067112573051015776</guid><description>&lt;b&gt;Old-Style finders are deprecated&lt;/b&gt;&lt;br /&gt;

In Rails 4, Old-Style finders are deprecated. Consider User model with name, age members&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;Class User &lt; ActiveRecord::Base
&amp;nbsp; attr_accessor :name,:age

&amp;nbsp; def initialize(name, age)
&amp;nbsp; &amp;nbsp;&amp;nbsp;@name = name
&amp;nbsp; &amp;nbsp;&amp;nbsp;@age = age
&amp;nbsp; end
end
&lt;/pre&gt;
&lt;br /&gt;
In this class, If we want find user with name of 'foo'. See the difference in rails 3 and rails 4 call  
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;#Rails 3
User.find(:all, conditions: { name: 'foo' })
&lt;/pre&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;#Rails 4
User.where(name: 'foo')
&lt;/pre&gt;&lt;br /&gt;
In rails 4, you will get DEPRECATION WARNING: Calling #find(:all) is deprecated. You can call #all directly instead or build a scope instead of using finder options.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dynamic finders that return collections are deprecated&lt;/b&gt;&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;#Rails 3
User.find_all_by_name('foo')
&lt;/pre&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;#Rails 4
User.where(name: 'foo')
&lt;/pre&gt;&lt;br /&gt;
In Rails 4 alerts DEPRECATION WARNING if we use dynamic method(User.find_all_by_name). Preferable alternative option is User.where(...).all &lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Install Tombay on Mac</title><link>http://about-opensource.blogspot.com/2013/03/install-tombay-on-mac.html</link><category>Install</category><category>Mac OS</category><category>Tombay</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 26 Mar 2013 23:43:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-5205861149419594185</guid><description>Tombay is a good note-taking application for Linux.After I have changed to Mac, I was looking for a similar note-taking application. At the end, I installed Tombay on my Mac Mountain Lion/Lion.&lt;br /&gt;
&lt;br /&gt;
Here are the quick steps I have followed to install Tombay.&lt;br /&gt;
&lt;br /&gt;
1. Make sure you have n't installed Mono library. If your system has any previous installation, uninstall it.&lt;br /&gt;
&lt;br /&gt;
2. Download and install &lt;a href="http://download.mono-project.com/archive/2.8/macos-10-universal/10/MonoFramework-2.8_10.macos10.novell.universal.dmg"&gt;Mono&lt;/a&gt;. Why we need Mono library? - Since tombay is written in C#, system needs Mono runtime to build and run on mac.
   &lt;br /&gt;
&lt;br /&gt;
3. Get the latest source code from repository.&lt;br /&gt;
&lt;br /&gt;
git clone git://git.gnome.org/tomboy&lt;br /&gt;
&lt;br /&gt;
4. Build and Open the application. Go to the source code directory(tombay)&lt;br /&gt;
&lt;br /&gt;
$ xbuild Tomboy-mac.sln&lt;br /&gt;
$ ./bundle-mac-app.sh&lt;br /&gt;
$ open Tomboy.app&lt;br /&gt;
&lt;br /&gt;
After the above step, Tombay application is successfully installed and available on spotslight search. I hope these steps helpful to install Tombay on Mac Mountain Lion/Lion.&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><enclosure length="106455621" type="application/x-apple-diskimage" url="http://download.mono-project.com/archive/2.8/macos-10-universal/10/MonoFramework-2.8_10.macos10.novell.universal.dmg"/><itunes:explicit/><itunes:subtitle>Tombay is a good note-taking application for Linux.After I have changed to Mac, I was looking for a similar note-taking application. At the end, I installed Tombay on my Mac Mountain Lion/Lion. Here are the quick steps I have followed to install Tombay. 1. Make sure you have n't installed Mono library. If your system has any previous installation, uninstall it. 2. Download and install Mono. Why we need Mono library? - Since tombay is written in C#, system needs Mono runtime to build and run on mac. 3. Get the latest source code from repository. git clone git://git.gnome.org/tomboy 4. Build and Open the application. Go to the source code directory(tombay) $ xbuild Tomboy-mac.sln $ ./bundle-mac-app.sh $ open Tomboy.app After the above step, Tombay application is successfully installed and available on spotslight search. I hope these steps helpful to install Tombay on Mac Mountain Lion/Lion.about-opensource.blogspot.com</itunes:subtitle><itunes:author>noreply@blogger.com (Anonymous)</itunes:author><itunes:summary>Tombay is a good note-taking application for Linux.After I have changed to Mac, I was looking for a similar note-taking application. At the end, I installed Tombay on my Mac Mountain Lion/Lion. Here are the quick steps I have followed to install Tombay. 1. Make sure you have n't installed Mono library. If your system has any previous installation, uninstall it. 2. Download and install Mono. Why we need Mono library? - Since tombay is written in C#, system needs Mono runtime to build and run on mac. 3. Get the latest source code from repository. git clone git://git.gnome.org/tomboy 4. Build and Open the application. Go to the source code directory(tombay) $ xbuild Tomboy-mac.sln $ ./bundle-mac-app.sh $ open Tomboy.app After the above step, Tombay application is successfully installed and available on spotslight search. I hope these steps helpful to install Tombay on Mac Mountain Lion/Lion.about-opensource.blogspot.com</itunes:summary><itunes:keywords>Install, Mac OS, Tombay</itunes:keywords></item><item><title>Install instruction for Tomcat 7 on Mac</title><link>http://about-opensource.blogspot.com/2013/03/install-instruction-for-tomcat-7-on-mac.html</link><category>Java</category><category>Java Application Server</category><category>Mac OS</category><category>Tomcat 7</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 18 Mar 2013 23:41:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-8799534220366419775</guid><description>&lt;style type="text/css"&gt;
.code {background-color:#f5f5f5;display:block;padding:17px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre-wrap;}
&lt;/style&gt;
To install Tomcat 7 you should have Java 1.6+, so make sure version of java on your Mac by using "java --version" command. 
&lt;br /&gt;
Here are the quick steps to install Tomcat 7 on Mac. I believe it may take few minutes to install
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="code"&gt;
1. Download a Core Binary file from &lt;a href="http://tomcat.apache.org/download-70.cgi"&gt;here&lt;/a&gt;. The link of the binary file looks like this
http://apache.techartifact.com/mirror/tomcat/tomcat-7/v7.0.37/bin/apache-tomcat-7.0.37.tar.gz
&lt;br /&gt;
2.Extract the downloaded binary file
tar -xzvf ~/Downloads/apache-tomcat-7.0.37.tar.gz
&lt;br /&gt; 
3.Create or make sure you have local folder.If you don't have it then create it
sudo mkdir /usr/local
Then move the extracted binary files to /usr/local
sudo mv ~/Downloads/apache-tomcat-7.0.37  /usr/local
&lt;br /&gt;
4.Soft link the installed folder to Mac's library folder. To maintain easily the installed application
sudo ln -s /usr/local/apache-tomcat-7.0.37  /Library/Tomcat7
&lt;br /&gt;
5. Change the ownership and executable permission to application folder
sudo chown -R YOUR_MAC_USER_NAME  /Library/Tomcat7
sudo chmod +x /Library/Tomcat7/bin/*.sh
&lt;br /&gt;
6. Installation is done, now you can start/stop the Tomcat7 Service
/Library/Tomcat7/bin/startup.sh
/Library/Tomcat7/bin/shutdown.sh
&lt;br /&gt;
7. Open your browser and type the URL to see welcome message of tomcat7 application server - http://localhost:8080
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Spring Roo commands - Database setup</title><link>http://about-opensource.blogspot.com/2013/03/spring-roo-commands-database-setup.html</link><category>Hibernate</category><category>Spring Roo</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Thu, 14 Mar 2013 17:14:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-841494680834694388</guid><description>Spring Roo is a next-generation rapid application development tool for Java developers. Developing domain models for application with support of Hibernate or any other provider is very easy. I was planning to explain different commands and purpose further post. This post is for simply database setup.&lt;br /&gt;
&lt;br /&gt;
I believe you have setup of Spring Roo tool or STS editor which supports Spring Roo. If not please download and install it from here -&amp;nbsp;http://www.springsource.org/spring-roo.&lt;br /&gt;
&lt;br /&gt;
Then create a new Spring/Spring Roo project. Refer this tutorial for more information -&amp;nbsp;http://static.springsource.org/spring-roo/reference/html/beginning.html&lt;br /&gt;
&lt;br /&gt;
Now coming back to database setup, I generally use hibernate, so here is the command to create &amp;nbsp;Hibernate provider for database PostgreSQL with username, password, database name and host name which i provide on the command. command which looks like this&lt;br /&gt;
&lt;br /&gt;
&lt;div class="p1"&gt;
&lt;span class="s1"&gt;&lt;b&gt;roo&amp;gt;&lt;/b&gt; jpa&lt;/span&gt; setup --provider HIBERNATE --database POSTGRES --hostName &lt;span class="s1"&gt;localhost&lt;/span&gt; --userName &lt;span class="s1"&gt;user&lt;/span&gt; --password &lt;span class="s1"&gt;password&lt;/span&gt; --databaseName &lt;span class="s1"&gt;foo&lt;/span&gt;&lt;br /&gt;
&lt;span class="s1"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="s1"&gt;If you want to change the provider, database. you can do it easily. For instance if your opted database is &amp;nbsp;MySQL then change the part command like &lt;/span&gt;--database MYSQL&lt;br /&gt;
&lt;span class="s1"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="s1"&gt;After the execution of this command, Config files and postgres&amp;nbsp;artifacts for database support will be created automatically. Further post, I'll give more details about how to create a model, fields for the model&amp;nbsp;and relations.&lt;/span&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>TextMate bundles/plugins - Ruby on Rails application development </title><link>http://about-opensource.blogspot.com/2013/03/textmate-bundlesplugins-ruby-on-rails.html</link><category>jQuery</category><category>Ruby on Rails</category><category>TextMate</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Thu, 14 Mar 2013 16:48:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-6933658014965044764</guid><description>As we know the best choice of editor to develop Ruby on Rails application on Mac is &lt;a href="http://macromates.com/" target="_blank"&gt;TextMate&lt;/a&gt;. As a developer we always think application quality and easiest way of development. As we know developing rails application is fun. I think some of the TextMate plugins help developing Ruby on Rails application even more fun.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://github.com/carlosbrando/ruby-on-rails-tmbundle" target="_blank"&gt;Ruby on Rails&lt;/a&gt;&amp;nbsp;- It's one of the nice bundle for rails application development.&amp;nbsp;Learn it with PeepCode - http://peepcode.com/products/textmate-for-rails-2&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://peepcode.com/products/peepopen" target="_blank"&gt;PeepOpen&lt;/a&gt; - It's a file navigation application. It helps to search a file in your project with just typing few characters of the file name. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://github.com/subtleGradient/javascript-tools.tmbundle" target="_blank"&gt;JavaScript Tools&lt;/a&gt;&amp;nbsp;- It contains Essential Tools for developing Javascript in TextMate&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://github.com/kswedberg/jquery-tmbundle" target="_blank"&gt;jQuery&lt;/a&gt; - It's a jQuery bundle for TextMate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Release - Vaadin 7.0.0!</title><link>http://about-opensource.blogspot.com/2013/02/release-vaadin-700.html</link><category>Java</category><category>Release</category><category>Vaadin</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 6 Feb 2013 16:44:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-5623328856497077944</guid><description>Vaadin team has been&amp;nbsp;announced&amp;nbsp;release 7.0.0. As you know vaadin is a Java Framework which has been developing modern web application and easy UI stuff on top of GWT that looks great and perform well on web application.&lt;br /&gt;
&lt;br /&gt;
This release has &lt;a href="http://vaadin.com/7" target="_blank"&gt;65 added features&lt;/a&gt;. You can download it from &lt;a href="https://vaadin.com/download" target="_blank"&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Check out this link for more information about the release&lt;br /&gt;
&lt;a href="https://vaadin.com/blog/-/blogs/the-next-reindeer-is-here-vaadin-7-0-0-is-out"&gt;https://vaadin.com/blog/-/blogs/the-next-reindeer-is-here-vaadin-7-0-0-is-out&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Brython - A Javascript translator </title><link>http://about-opensource.blogspot.com/2012/12/brython-javascript-translator.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 17 Dec 2012 23:44:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-2432011735364333121</guid><description>&lt;a href="http://www.brython.info/" target="_blank"&gt;Brython&lt;/a&gt; is a python to Javascript translator.&amp;nbsp;Check these links for documentation and download.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.brython.info/doc/en/index.html" target="_blank"&gt;Documention&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://code.google.com/p/brython/downloads/list" target="_blank"&gt;Download&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title> Handling Camera in iOS Applications</title><link>http://about-opensource.blogspot.com/2012/12/handling-camera-in-ios-applications.html</link><category>Camera</category><category>iOS</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 17 Dec 2012 23:36:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-904244147192382723</guid><description>&lt;a href="http://blog.denivip.ru/index.php/2012/07/handling-camera-in-ios-applications/?lang=en"&gt;http://blog.denivip.ru/index.php/2012/07/handling-camera-in-ios-applications/?lang=en&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope it may helpful to implementation of handling camera in iOS Application&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Rails 3.x - Undoing commands </title><link>http://about-opensource.blogspot.com/2012/11/rails-3x-undoing-commands.html</link><category>Commands</category><category>Rails 3</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 21 Nov 2012 22:37:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-6950666002172187571</guid><description>&lt;b&gt;&lt;u&gt;Controller and Action&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In rails 3.x, To create a controller with actions we use this command&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;$ rails generate controller UserController add edit
&lt;/pre&gt;
&lt;br /&gt;
If you want to remove the above controller and the actions&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;$ rails destroy controller User add edit
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Model&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
To create a model in rails 3&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;$ rails generate model User name:string mobile:string
&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
This can be undone using&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;$ rails destroy model User
&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;&lt;u&gt;Database migration and rollback&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
To migrate the state of the database using&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;$ rake db:migrate
&lt;/pre&gt;
&lt;br /&gt;
We can undo a single migration by this command&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;$ rake db:rollback
&lt;/pre&gt;
&lt;br /&gt;
To go all the way back to the beginning by this command&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="background-color: #122312; border-bottom-color: rgb(160, 160, 160); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(160, 160, 160); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(160, 160, 160); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(160, 160, 160); border-top-style: solid; border-top-width: 1px; color: white; font-size: 12.5px; line-height: 15px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;$ rake db:migrate VERSION=0
&lt;/pre&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;These commands may be helpful for reverting controller, model and database migration specific changes.&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Clutch.IO - Library for native iOS applications</title><link>http://about-opensource.blogspot.com/2012/11/clutchio-library-for-native-ios.html</link><category>Clutch</category><category>open source</category><category>Twitter</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 20 Nov 2012 20:21:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-3323886908773064316</guid><description>Twitter open-sourced an&amp;nbsp;easy-to-integrate library for native iOS applications which is designed to help you develop faster, deploy instantly and run A/B tests.&lt;br /&gt;
&lt;br /&gt;
Git Source Repository:&lt;br /&gt;
&lt;a href="https://github.com/clutchio/clutch"&gt;https://github.com/clutchio/clutch&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>AWS - Windows Server 2012</title><link>http://about-opensource.blogspot.com/2012/11/aws-windows-server-2012.html</link><category>AWS</category><category>Windows Server 2012</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 20 Nov 2012 20:09:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-303046737417724734</guid><description>AWS Team&amp;nbsp;announced available of Windows Server 2012. It comes with Free Tier, New Languages,&amp;nbsp;AWS Elastic Beanstalk Support for Windows Server 2012, .NET 4.5 and Visual Studio 2012 Support, etc.&lt;br /&gt;
&lt;br /&gt;
For more information and Getting Started video &lt;a href="http://aws.typepad.com/aws/2012/11/windows-server-2012-now-available-on-aws.html" target="_blank"&gt;checkout here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&lt;a href="http://aws.typepad.com/aws/2012/11/windows-server-2012-now-available-on-aws.html"&gt;http://aws.typepad.com/aws/2012/11/windows-server-2012-now-available-on-aws.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Rails 3.2.9</title><link>http://about-opensource.blogspot.com/2012/11/rails-329.html</link><category>Rails</category><category>Release</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 20 Nov 2012 20:02:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-1723814775093931927</guid><description>Rails team&amp;nbsp;announced&amp;nbsp;it's new release 3.2.9. It includes changes/bug fixes in Action Pack, Active Model and etc.&lt;br /&gt;
&lt;br /&gt;
Have a look more information &lt;a href="http://weblog.rubyonrails.org/2012/11/12/ann-rails-3-2-9-has-been-released/" target="_blank"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Front/Web Engineer's tools</title><link>http://about-opensource.blogspot.com/2012/11/frontweb-engineers-tools.html</link><category>Web Tools</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 19 Nov 2012 18:32:00 +1100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-6803896524080567644</guid><description>Front/Web Engineers generally prefer quickly develop their application with the help of development, debug and testing tools. Check these tools. It may helpful to your web development&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;a href="http://requestb.in/" target="_blank"&gt;RequestBin&lt;/a&gt;&lt;/b&gt;&amp;nbsp;-&amp;nbsp;&lt;a href="http://requestb.in/"&gt;http://requestb.in/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;It lets you create a URL that will collect requests made to it, then let you inspect them in a human-friendly way. Use RequestBin to see what your HTTP client is sending or to look at webhook requests.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;a href="http://hurl.it/" target="_blank"&gt;Hurl&lt;/a&gt;&lt;/b&gt; -&amp;nbsp;&lt;a href="http://hurl.it/"&gt;http://hurl.it/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It makes HTTP requests.&lt;br /&gt;Enter a URL, set some headers, view the response, then share it with others.&lt;br /&gt;Perfect for demoing and debugging APIs.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;a href="http://validator.w3.org/feed/" target="_blank"&gt;Feed validator&lt;/a&gt;&lt;/b&gt; - &lt;a href="http://validator.w3.org/feed/" style="color: #3465a4;"&gt;http://validator.w3.org/feed/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's for check the syntax of Atom or RSS feeds&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;a href="http://validator.w3.org/checklink" target="_blank"&gt;Link checker&lt;/a&gt; -&amp;nbsp;&lt;/b&gt;&lt;a href="http://validator.w3.org/checklink"&gt;http://validator.w3.org/checklink&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;It's extracts links recursively from a Web site and checks that no link is defined twice, that all the links are dereferenceable&amp;nbsp;and warns about HTTP redirects.&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Install Postgres gem issue on rails app</title><link>http://about-opensource.blogspot.com/2012/09/install-postgres-gem-issue-on-rails-app.html</link><category>Rails3</category><category>Ruby</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Thu, 6 Sep 2012 15:08:00 +1000</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-1745814152381967407</guid><description>&lt;div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;When you try to install postgres gem for your application, but unfortunately you end up with this problem&lt;/span&gt;&lt;/div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
$ gem install pg -v '0.14.0'&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Building native extensions.&amp;nbsp; This could take a while...&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;ERROR:&amp;nbsp; Error installing pg:&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ERROR: Failed to build gem native extension.&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /home/user/.rvm/rubies/ruby-&lt;/span&gt;&lt;wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/wbr&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;1.9.3/bin/ruby extconf.rb&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;checking for pg_config... yes&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Using config values from /usr/bin/pg_config&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;checking for libpq-fe.h... *** extconf.rb failed ***&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Could not create Makefile due to some reason, probably lack of&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;necessary libraries and/or headers.&amp;nbsp; Check the mkmf.log file for more&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;details.&amp;nbsp; You may need configuration options.&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Provided configuration options:&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-opt-dir&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-opt-dir&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-opt-include&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-opt-include=${opt-&lt;/span&gt;&lt;wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/wbr&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;dir}/include&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-opt-lib&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-opt-lib=${opt-dir}/&lt;/span&gt;&lt;wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/wbr&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;lib&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-make-prog&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-make-prog&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --srcdir=.&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --curdir&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --ruby=/home/user/.rvm/&lt;/span&gt;&lt;wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/wbr&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;rubies/ruby-1.9.3/bin/&lt;/span&gt;&lt;wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/wbr&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;ruby&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-pg&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-pg&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-pg-dir&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-pg-dir&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-pg-include&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-pg-include=${pg-dir}&lt;/span&gt;&lt;wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/wbr&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;/include&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-pg-lib&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-pg-lib=${pg-dir}/lib&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-pg-config&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-pg-config&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --with-pg_config&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --without-pg_config&lt;/span&gt;&lt;div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
$ sudo apt-get install libpq-dev&lt;/div&gt;
&lt;div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
You need to install postgresql-server for building a&amp;nbsp;server-side extension or libpq-dev for building a client-side application.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) </title><link>http://about-opensource.blogspot.com/2012/09/could-not-find-javascript-runtime-see.html</link><category>Rails</category><category>Ruby</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 3 Sep 2012 20:54:00 +1000</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-6349538200473470004</guid><description>$ rails server&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
/home/user/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from /home/user/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs.rb:5:in `&amp;lt;module:ExecJS&amp;gt;'&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
The reason for this issue is missing Node JS Package Manager. Check this link for how to install package manger based on your operating system.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I hope it may help you to solve the problem.&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>The program 'rails' is currently not installed.  You can install it by typing: sudo apt-get install rails </title><link>http://about-opensource.blogspot.com/2012/09/the-program-rails-is-currently-not.html</link><category>Rails</category><category>Ruby</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 3 Sep 2012 17:41:00 +1000</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6522431680859447038.post-5189273860669163419</guid><description>user@localhost:~$ rails new blog&lt;br /&gt;
The program 'rails' is currently not installed. &amp;nbsp;You can install it by typing: sudo apt-get install rails&lt;br /&gt;
&lt;br /&gt;
If you get this message when you were creating new rails project. To fix this issue&lt;br /&gt;
&lt;br /&gt;
1. Go to&amp;nbsp;profile settings (.bashrc or .bash_profile)&lt;br /&gt;
&lt;br /&gt;
2. Add this line at end of the file&lt;br /&gt;
&lt;br /&gt;
[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;amp;&amp;amp; source "$HOME/.rvm/scripts/rvm" # Loading RVM into a shell&lt;br /&gt;
&lt;br /&gt;
3. If you are in existing shell prompt, execute this command&lt;br /&gt;
&lt;br /&gt;
source &lt;a href="http://www.blogger.com/~/.bashrc" style="color: #3465a4;"&gt;~/.bashrc&lt;/a&gt; &lt;br /&gt;or&lt;br /&gt;source &lt;a href="http://www.blogger.com/~/.bash_profile" style="color: #3465a4;"&gt;~/.bash_profile&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you open a new terminal, you can notice &amp;nbsp;that rails command is automatically available.I hope this post helpful to fix rails command issue.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
I believe you have installed ruby by Ruby Version Manger(RVM). Refer the installation steps&lt;br /&gt;
&lt;a href="https://rvm.io/rvm/install/"&gt;https://rvm.io/rvm/install/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;about-opensource.blogspot.com&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>