<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Peter Boling - Home</title>
  <id>tag:www.peterboling.com,2011:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://www.peterboling.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.peterboling.com/" rel="alternate" type="text/html"/>
  <updated>2011-05-25T15:51:01Z</updated>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2011-05-25:1590</id>
    <published>2011-05-25T13:26:00Z</published>
    <updated>2011-05-25T15:51:01Z</updated>
    <category term="Personal Blog"/>
    <category term="Religion"/>
    <category term="&quot;free will&quot;"/>
    <category term="determinism"/>
    <category term="lds"/>
    <category term="mormon"/>
    <link href="http://www.peterboling.com/2011/5/25/determinism-versus-free-will-in-mormonism" rel="alternate" type="text/html"/>
    <title>Determinism versus Free Will in Mormonism</title>
<content type="html">
            &lt;p&gt;At times I have spoken negatively of the church, however, I do have respect for some aspects of the church, and many of its past and present leaders. This note has nothing negative, it is exclusively about what I find inspirational in Mormonism.  There are no links to any other sites.  I have gathered from some of the best minds in Mormonism, quotes which I feel show an acute understanding of my current philosophy about life. These ideas stand the test of time, and even the switch to atheism.  This is what I am grateful for in Mormonism, and I thought people would like to hear me say some positive things.  I hope you find them to be so.  In a sense you could say that my current belief is an amalgamation of the following quotes from Brigham Young, John Taylor, Parley P. Pratt, James E. Talmage, Stephen L. Richards, B. H. Roberts, John A. Widtsoe, Ezra Taft Benson, and Hugh B. Brown &#8211; all prophets, apostles, or general authorities of the church.  One quote is even &#8220;scriptural&#8221; in nature coming straight from general conference.  I am &#8220;quote mining&#8221; a little, but the quotes are generally complete thoughts in and of themselves, as you will see.  There are far more quoted words in this note, than my own words.  You may not get the same meaning out of these quotes as I do, and that is to be expected.  We are all different.  I am certainly interpreting them with a bias toward my current understanding of reality.&lt;/p&gt;


	&lt;p&gt;My Current Philosophy&lt;/p&gt;


	&lt;p&gt;Determinism is the concept that everything has a cause.  This idea generally abolishes the idea of free will.  Some determinists argue that the absence of free will negates the idea of personal responsibility.  I do not agree with this, and find that responsibility is as valid as it would be if we did have true agency.  Perhaps an example would be useful.  If you have a computer which gets a virus, and the virus makes it so you can&#8217;t get work done on the computer, you would say the virus is the &#8220;cause&#8221; of the problem (determinism) but also that it is &#8220;responsible&#8221; for the problem.  Though it didn&#8217;t choose to cause problems, as it only follows the routines that are programmed into it, and has no ability to do otherwise, the problems occurred regardless of choice.  In this sense &#8220;cause&#8221; and &#8220;responsible&#8221; have the same meaning.  The virus needs to be &#8220;punished&#8221; for what it did, and so you attempt to remove it from the computer.  I do believe in personal responsibility.&lt;/p&gt;


	&lt;p&gt;I will make the case that determinism has a place in Mormon theology.   What we call &#8220;free will&#8221; or &#8220;moral agency&#8221;, when properly understood is but an illusion of our mortal consciousness, which is but a complex chemical reaction occurring in our brain.  I will first get a bunch of ideas down and then refine my thoughts later (as in a later date &#8211; this is somewhat unfinished &#8211; but I thought it worthwhile to share).&lt;/p&gt;


	&lt;p&gt;What do I believe about miracles?&lt;/p&gt;


	&lt;p&gt;The same thing Brigham Young did.  There are no miracles, there are causes and there are results, or effects.&lt;/p&gt;


	&lt;p&gt;&#8220;Yet I will say with regard to miracles, there is no such thing save to the ignorant &#8211; that is, there never was a result wrought out by God or by any of His creatures without there being a cause for it. There may be results, the causes of which we do not see or understand, and what we call miracles are no more than this &#8211; they are the results or effects of causes hidden from our understandings.&#8221; [Brigham Young, Journal of Discourses, vol. 13, pg. 140 &#8211; p.141, 11 Jul 1869].&lt;/p&gt;


	&lt;p&gt;Miracles have scientific, and deterministic, causes that are just waiting to be discovered, rendering them all but miraculous to later generations who understand the causes.  &#8216;Miracle&#8217; is a fancy way of saying &#8220;I don&#8217;t know how&#8221;, and once when we understand how the universe works, &#8220;I don&#8217;t know how, yet, but I could figure it out.&#8221;&lt;/p&gt;


	&lt;p&gt;What do I believe about the mutability of the laws of nature?&lt;/p&gt;


	&lt;p&gt;Same as John Taylor.&lt;/p&gt;


	&lt;p&gt;&#8220;Science reveals the beauty and harmony of the world material; it unveils to us ten thousand mysteries in the kingdom of nature, and shows that all forms of life through fire and analogous decay are returned again to its bosom. It unfolds to us the mysteries of cloud and rains, dew and frost, growth and decay, and reveals the operation of those silent irresistible forces which give vitality to the world. It reveals to us the more wonderful operations of distant orbs and their relations to the forces of nature. It also reveals another grand principle, that the laws of nature are immutable and unchangeable as are all the works of God.&#8221; [John Taylor, Journal of Discourses, vol. 13, pg. 224, 6 May 1870].&lt;/p&gt;


	&lt;p&gt;There are no optional outcomes.  One thing leads to another in a programmatic fashion with no potential for alternative paths.  Evaporation directly results in rain, and it really is that simple.&lt;/p&gt;


	&lt;p&gt;Did the universe, and life in it, evolve from simpler patterns in ages past?&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;I agree with Brigham Young on this one:&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;&#8220;The origin of life whether human or inferior, must be lodged in some character whom I have not seen! Follow it back, no matter whether it be for six thousand years, six millions, six million millions, or billions of years, the figures and numbers are immaterial, I must have come from some source, my natural philosophy teaches me this. But, leaving the natural philosophy of the child free from false tradition, let us inquire. What does the philosophy of the Christian sects, or many of them, not all, teach? &#8220;God made the world in six days, out of nothing!&#8221; This is very wrong; no child should be taught any such dogma. God never did make a world out of nothing; He never will, He never can!&#8221; [Brigham Young, Journal of Discourses, vol. 13, pg. 248, 25 Sep 1870].&lt;/p&gt;


	&lt;p&gt;&#8220;He never can!&#8221; indicates that there are some things God cannot do.  God cannot do anything other than follow the laws of the universe which are &#8220;immutable and unchangeable&#8221; (see John Talyor quote just above).&lt;/p&gt;


	&lt;p&gt;Does God have free will?&lt;/p&gt;


	&lt;p&gt;If God is bound by the natural laws in place, and cannot choose to not follow them, can he choose anything at all?&lt;/p&gt;


	&lt;p&gt;For the answer I turn again to Brigham Young:&lt;/p&gt;


	&lt;p&gt;&#8220;It is hard to get the people to believe that God is a scientific character, that He lives by science or strict law&#8230;&#8221; [Brigham Young, Journal of Discourses, vol. 13, pg. 302, 13 Nov 1870].&lt;/p&gt;


	&lt;p&gt;Can anything ever occur that is contrary to the laws of nature?&lt;/p&gt;


	&lt;p&gt;No, it cannot.  For that would be miraculous, and miracles, as such, do not exist.  So I agree with Parley P. Pratt here:&lt;/p&gt;


	&lt;p&gt;&#8220;Among the popular errors of modern times, an opinion prevails that miracles are events which transpire contrary to the laws of nature, that they are effects without a cause. If such is the fact, then, there never has been a miracle, and there never will be one. The laws of nature are the laws of truth. Truth is unchangeable, and independent in its own sphere. A law of nature never has been broken. And it is an absolute impossibility that such law ever should be broken.&#8221; [Parley P. Pratt, Key to the Science of Theology, 1891, pg. 102].&lt;/p&gt;


	&lt;p&gt;The miracles of 10, 50, or 150 years ago, may not be miracles today, due to increased understanding of how things work.  A child who got sick with a 24 hour bug in 1830 may have gotten a blessing and been &#8216;healed&#8217;.  It may have been called a miracle.  But did anything happen other than what must have happened given the chemicals in his body and the environment of his surroundings?  No.  It cannot be otherwise, because God follows the unchangeable laws of the universe meaning there is only one potential outcome.  If it is not so, then it would be impossible for him to know the end from the beginning.&lt;/p&gt;


	&lt;p&gt;&#8220;Miracles are commonly regarded as occurrences in opposition to the laws of nature. Such a conception is plainly erroneous, for the laws of nature are inviolable. However, as human understanding of these laws is at best but imperfect, events strictly in accordance with natural law may appear contrary thereto. The entire constitution of nature is founded on system and order.&#8221; [James E. Talmage, The Articles of Faith, Deseret Book, &lt;span class=&quot;caps&quot;&gt;SLC&lt;/span&gt;, 1966, originally published 1899, pg. 220.]&lt;/p&gt;


	&lt;p&gt;If there is only one way things can happen in the future and only one way they happened in the past where does this leave us?  First we must understand that looking to science for understanding of the genesis of humanity is appropriate, and worthwhile.  Understanding how we came to be, physically, is important to understanding what we really are.&lt;/p&gt;


	&lt;p&gt;How do I feel about a literal interpretation of scripture?&lt;/p&gt;


	&lt;p&gt;I agree with Stephen L. Richards, that a literal interpretation is unfounded:&lt;/p&gt;


	&lt;p&gt;&#8220;The time of creation has ever been a subject of much comment and dispute. Yet I challenge anybody to produce from the Bible itself any finite limitation whatsoever of the periods of creation. By strained inferential references and interpretations men have sought to set the time in days or periods of a thousand years, but I feel sure that no justification of such limitations is warranted by the scriptures themselves. If the evolutionary hypothesis of the creation of life and matter in the universe is ultimately found to be correct, and I shall neither be disappointed nor displeased if it shall turn out so to be, in my humble opinion the Biblical account is sufficiently comprehensive to include the whole of the process.&#8221; [Stephen L. Richards, &#8220;An Open Letter to College Students,&#8221; Improvement Era, vol. 36 (June 1933), pg. 451-453, 484-485].&lt;/p&gt;


	&lt;p&gt;Why is it important to understand the evidence for evolution, and the history of life on earth?&lt;/p&gt;


	&lt;p&gt;There are many who are currently trying to promote ignorance of the subject, and many, even Mormons, who discount evolution, when it is proven, verifiable fact, and has been so for at least a hundred years.  On this topic I have utmost respect for B.H. Roberts, one of the greatest (and smartest) general authority/scientists to ever live:&lt;/p&gt;


	&lt;p&gt;&#8220;On the other hand, to limit and insist upon the whole of life and death to this side of Adam&#8217;s advent to the earth, some six or eight thousand years ago, as proposed by some, is to fly in the face of the facts so indisputably brought to light by the researcher of science in modern times, and this as set forth by men of the highest type in the intellectual and moral world; not inferior men, or men of sensual and devilish temperament, but men who must be accounted as among the noblest and most self-sacrificing of the sons of men &#8211; of the type whence must come the noblest sons of God, since &#8220;the glory of God is intelligence&#8221; (D&#38;C 93:36); and that too the glory of man. These researchers after truth are of that class. To pay attention to and give reasonable credence to their research and findings is to link the church of God with the highest increase of human thought and effort. On that side lies development, on the other lies contraction. It is on the former side that research work is going on and will continue to go on, future investigation and discoveries will continue on that side, nothing will retard them, and nothing will develop on the other side. One leads to narrow sectarianism, the other keeps the open spirit of a world movement with which our New Dispensation began. As between them which is to be our choice?&#8221; [B. H. Roberts, The Truth, the Way, the Life, originally written 1931, published by Smith Research Associates, Salt Lake City, UT, 1994, pg. 364].&lt;/p&gt;


	&lt;p&gt;There have been many at all levels of the church who were strong advocates of evolution.  I especially appreciate the emphasis John A. Widtsoe puts on valuing truth above all else:&lt;/p&gt;


	&lt;p&gt;&#8220;Every person must decide for himself, on the basis of the evidence produced, which of these three opinions as to the age of the earth, before Adam, seems most reasonable to him, whether (1) six days, or (2) six thousand years, or (3) many millions of years. Clearly it does not matter to one&#8217;s daily welfare or ultimate salvation which view he adopts, except that every Latter-day saint must seek and cherish truth above all else.&#8221; [John A. Widtsoe, Evidences and Reconciliations, Bookcraft, 1960, pg. 149].&lt;/p&gt;


	&lt;p&gt;&#8220;The progress of science may yet shed much light on the origin of the earth.&#8221; [John A. Widtsoe, Evidences and Reconciliations, Bookcraft, Salt Lake City, 1960, pg. 150].&lt;/p&gt;


	&lt;p&gt;How do I feel about the convergence of religion and science?&lt;/p&gt;


	&lt;p&gt;I cannot argue with Ezra Taft Benson, speaking in General Conference, for he spoke the truth.  True religion and true science can never conflict.  Truth is always true.&lt;/p&gt;


	&lt;p&gt;&#8220;Religion and science have sometimes been in apparent conflict. Yet the conflict should only be apparent, not real for science should seek truth, and true religion is truth. There can never be conflict between revealed religion and scientific fact. That they have often occupied different fields of truth is a mere detail. The gospel accepts and embraces all truth; science is slowly expanding her arms and reaching into the invisible domain in search of truth. The two are meeting daily &#8211; science as a child, revealed religion as the mother. Truth is truth, whether labeled science or religion. There can be no conflict. Time is on the side of truth &#8211; for truth is eternal.&#8221; [Ezra Taft Benson, &lt;span class=&quot;caps&quot;&gt;LDS&lt;/span&gt; Conference Report, Apr. 1966, pg. 129].&lt;/p&gt;


	&lt;p&gt;I know that religion has erred, and science has erred.  Religion, in general is slow at making corrections when shown to be wrong.  Science can also be slow to acommodate new evidence.  There really is only one result of the search in either field, and that is truth.  I have had to ecshew much of my religious belief, when I found things that I considered to be less in error.  I have likewise eschewed some scientific beliefs once I learned about new evidence which proved my ideas wrong.  In both cases I am trying to refine my views to be in line with reality.&lt;/p&gt;


	&lt;p&gt;How do I feel about scientific discovery?&lt;/p&gt;


	&lt;p&gt;I like what John Taylor has to say about it:&lt;/p&gt;


	&lt;p&gt;&#8220;True science is a discovery of the secret, immutable and eternal laws, by which the universe is governed; and when practically applied, sets in motion the mighty wheels of useful engines, with all the various machinery which genius has invented, or art contrived. It ameliorates the condition of man, by extending the means of intellectual, moral, social, and domestic happiness.&#8221; [John Taylor, Times and Seasons, vol. 4, pg. 46, 15 Dec 1842].&lt;/p&gt;


	&lt;p&gt;When we discover things through science and improve the human condition there is no magic involved.&lt;/p&gt;


	&lt;p&gt;How do I feel about academic research and exploring the unknown?&lt;/p&gt;


	&lt;p&gt;I agree with Hugh B Brown:&lt;/p&gt;


	&lt;p&gt;&#8220;We should all be interested in academic research. We must go out on the research front and continue to explore the vast unknown. We should be in the forefront of learning in all fields, for revelation does not come only through the prophet of God nor only directly from heaven in visions or dreams. Revelation may come in the laboratory, out of the test tube, out of the thinking mind and the inquiring soul, out of search and research and prayer and inspiration. We must be unafraid to contend for what we are thinking and to combat error with truth in this divided and imperiled world, and we must do it with the unfaltering faith that God is still in his heaven even though all is not well with the world.&#8221;&lt;/p&gt;


	&lt;p&gt;&#8220;We should be dauntless in our pursuit of truth and resist all demands for unthinking conformity. No one would have us become mere tape recorders of other people&#8217;s thoughts. We should be modest and teachable and seek to know the truth by study and faith. There have been times when progress was halted by thought control. Tolerance and truth demand that all be heard and that competing ideas be tested against each other so that the best, which might not always be our own, can prevail. Knowledge is the most complete and dependable when all points of view are heard. We are in a world of restlessness and skepticism, where old things are not only challenged but often disappear, but also a world of miraculous achievement, undreamed of accomplishment, and terrifying power. ...&#8221;&lt;/p&gt;


	&lt;p&gt;&#8220;While speak of independence and the right to think, to agree or disagree, to examine and question, I need to remind myself not to forget that fixed and unchanging laws govern all God&#8217;s creation, whether the vastness of the starry heavens or the minute revolving universe of the atom or human relationships. All is law. All is cause and effect, and God&#8217;s laws are universal. God has no favorites; no one is immune from either life&#8217;s temptations or the consequences of his or her deeds. God is not capricious.&#8221; [Hugh B. Brown, &#8220;A Final Testimony,&#8221; from Edwin B. Firmage, ed., The Memoirs of Hugh B. Brown: An Abundant Life, Signature Books, 1988].&lt;/p&gt;


	&lt;p&gt;Repeating part of the last quote because it is my final thought, and I am in complete agreement with it (given that I may disagree on the definition of God):&lt;/p&gt;


	&lt;p&gt;&#8220;While speak of independence and the right to think, to agree or disagree, to examine and question, I need to remind myself not to forget that fixed and unchanging laws govern all God&#8217;s creation, whether the vastness of the starry heavens or the minute revolving universe of the atom or human relationships. All is law. All is cause and effect, and God&#8217;s laws are universal.&#8221;&lt;/p&gt;


	&lt;p&gt;&#8220;All is cause and effect&#8221; is the essential definition of determinism, and it seems to also be an valid tenet of Mormonism.  I hope this has helped people understand what kind of Mormon I am.  Despite my atheism, I consider many of my views to &lt;strong&gt;be&lt;/strong&gt; Mormon.  They may not line up with your Mormon views, and there is nothing wrong with that.  I was asked to resign from the church (in a very kind manner) for some of my views which are not in line with current church policy&#8230; but I think the ones outlined here are broadly within the scope of Mormonism.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2011-04-26:1589</id>
    <published>2011-04-26T15:26:00Z</published>
    <updated>2011-04-26T15:39:38Z</updated>
    <category term="Rails Blog"/>
    <category term="linux"/>
    <link href="http://www.peterboling.com/2011/4/26/git-svn-fails-to-delete-directories" rel="alternate" type="text/html"/>
    <title>git-svn fails to delete directories</title>
<content type="html">
            &lt;p&gt;List all empty directories:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;find . -wholename './.git' -prune -o -type d -empty -print&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Find and delete all empty directories:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;find . -wholename './.git' -prune -o -type d -empty -print -exec rm -rf  \;&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;After deleting the directory it will complain that it cannot find the directory.  I&#8217;m not sure why.&lt;/p&gt;


	&lt;p&gt;Execute those commands several times until no more empty directories are found.  Nested empty directories have to be deleted in successive runs because they are not truly empty until their nested empties are deleted. :(&lt;/p&gt;


	&lt;p&gt;And fix the root of the problem:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;--rmdir
Only used with the dcommit, set-tree and commit-diff commands.&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;Remove directories from the SVN tree if there are no files left behind. SVN can version empty directories, and they are not removed by default if there are no files left in them. git cannot version empty directories. Enabling this flag will make the commit to SVN act like git.&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;config key: svn.rmdir&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2010-07-25:18</id>
    <published>2010-07-25T23:17:00Z</published>
    <updated>2011-04-26T15:24:56Z</updated>
    <category term="Rails Blog"/>
    <category term="mongrel"/>
    <category term="rails"/>
    <link href="http://www.peterboling.com/2010/7/25/rails-2-3-8-mongrel-1-1-5-bug" rel="alternate" type="text/html"/>
    <title>Rails 2.3.8 &amp; Mongrel 1.1.5 Bug</title>
<content type="html">
            &lt;p&gt;The response body is: &#8220;You are being redirected&#8221;.  The word &#8220;redirected&#8221; is a link to the page you wish it was going to.  You never actually get redirected (at least not in FF or Safari).&lt;/p&gt;


	&lt;p&gt;I read about the problem &lt;a href=&quot;https://rails.lighthouseapp.com/projects/8994/tickets/4690&quot;&gt;here&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;One of the later comments had a gist that fixed it for me.&lt;/p&gt;


	&lt;p&gt;Copy this &lt;a href=&quot;http://gist.github.com/471663&quot;&gt;text&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Paste into an initializer: mongrel_hack.rb&lt;/p&gt;


	&lt;p&gt;Commit, redeploy, done.&lt;/p&gt;


	&lt;p&gt;Then upgrade to Unicorn. :)&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2010-03-08:8</id>
    <published>2010-03-08T16:14:00Z</published>
    <updated>2011-04-26T15:13:49Z</updated>
    <category term="Rails Blog"/>
    <category term="install"/>
    <category term="macports"/>
    <category term="mysql"/>
    <category term="rails"/>
    <category term="rvm"/>
    <link href="http://www.peterboling.com/2010/3/8/rails-redo" rel="alternate" type="text/html"/>
    <title>Rails Redo</title>
<summary type="html">&lt;p&gt;My environment for Ruby &amp;amp; Rails development began showing signs of wear and tear.  I have been unable to get rvm to work for me at all.  I dream about having the wonderful abilities it can provide, like independent sandboxes for rubies &amp;amp; gemsets, and configurations.&lt;/p&gt;

&lt;p&gt;So when the latest gem upgrade (1.3.6) broke my older versions of rails (pre-2.3) things started to snowball uphill, and I decided to start over.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;My environment for Ruby &amp;amp; Rails development began showing signs of wear and tear.  I have been unable to get rvm to work for me at all.  I dream about having the wonderful abilities it can provide, like independent sandboxes for rubies &amp;amp; gemsets, and configurations.&lt;/p&gt;

&lt;p&gt;So when the latest gem upgrade (1.3.6) broke my older versions of rails (pre-2.3) things started to snowball uphill, and I decided to start over.&lt;/p&gt;
&lt;p&gt;My environment for Ruby &amp;amp; Rails development began showing signs of wear and tear.  I have been unable to get rvm to work for me at all.  I dream about having the wonderful abilities it can provide, like independent sandboxes for rubies &amp;amp; gemsets, and configurations.&lt;/p&gt;

&lt;p&gt;So when the latest gem upgrade (1.3.6) broke my older versions of rails (pre-2.3) things started to snowball uphill, and I decided to start over.  There are lots of how to&#8217;s for from scratch rails setup on Snow Leopard.  I utilized their guidance in doing my redo.&lt;/p&gt;

&lt;p&gt;These are some of the more recent MacPorts Ruby Rails guides I found:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://blog.adsdevshop.com/2009/06/14/installing-ruby-rails-and-mysql-on-mac-os-x-with-macports/&quot;&gt;Juston Blake&lt;/a&gt;,
&lt;a href=&quot;http://paulsturgess.co.uk/articles/show/46-using-macportsdarwinports-to-install-ruby-on-rails-mysql-subversion-capistrano-and-mongrel-on-mac-os-x&quot;&gt;Paul Sturgess&lt;/a&gt;,
&lt;a href=&quot;http://afreshcup.com/home/2009/9/2/migrating-to-snow-leopard-for-rails-development-a-definitive.html&quot;&gt;A Fresh Cup&lt;/a&gt;,
&lt;a href=&quot;http://garrickvanburen.com/archive/how-to-install-macports-apache2-rails-mysql-mongrel-and-subversion-on-an-intel-mac&quot;&gt;Garrick VanBuren&lt;/a&gt;,
&lt;a href=&quot;http://www.davesouth.org/stories/install-ruby-on-rails-using-macports&quot;&gt;Dave South&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is essentially from scratch, but I am not reinstalling my OS, or anything in the GUI.  My goal is to get current on my open source software leveraging the MacPorts suite of awesome.  I&#8217;ve never used it before, as I&#8217;ve always preferred to build my own stuff (ala &lt;a href=&quot;http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard&quot;&gt;hivelogic&lt;/a&gt;.  However, since I am currently running low on blood, sweat and tears, I&#8217;ll see if I can&#8217;t get by with making use of other people&#8217;s blood, sweat and tears.&lt;/p&gt;

&lt;p&gt;Prelim Flight testing:
You need to have the &lt;a href=&quot;http://developer.apple.com/technologies/xcode.html&quot;&gt;latest Xcode tools&lt;/a&gt; installed (3.2.1 is both the minimum required, and the latest release as of this writing, and is newer than what came on the Snow Leopard DVD)&lt;/p&gt;

&lt;p&gt;First save a copy of the gems you have installed for future reference:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem list &amp;gt; installed_gems.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Delete /opt/local and /usr/local&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo rm -rf /opt/local /usr/local
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href=&quot;http://www.macports.org/install.php&quot;&gt;Install latest MacPorts&lt;/a&gt; via your favorite method.  I used the .dmg.&lt;/p&gt;

&lt;p&gt;edit PATH in /etc/profile (including the MySQL bin which we install a bit further down):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PATH=&quot;/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin/:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin&quot;
export PATH=$PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Update MacPorts:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo port selfupdate
sudo port upgrade outdated
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install basic dev tools:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo port install mysql5
sudo port install mysql5-server
sudo port install ruby
sudo port install rb-rubygems
sudo port install rb-termios
sudo port install rb-mysql
sudo port install wget
sudo port clean --all sqlite3
# subversion install failed for me the first time I ran it, but then I ran clean -- all sqlite3 (above) and then the subversion install worked (not sure why, since the package it failed on was cyrus-sasl2)
sudo port install subversion 
sudo port install subversion-tools
sudo port install imagemagick
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Setup MySQL Server:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo -u _mysql mysql_install_db5
launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.socksudo    /opt/local/lib/mysql5/bin/mysqladmin -u root password 'blahblahblah'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h peter-bolings-macbook-2.local password 'blahblahblah'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Installed git with this little bash script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
# Install git
mkdir -p $HOME/src
cd $HOME/src
package=git &amp;amp;&amp;amp; version=1.7.0
curl -O http://kernel.org/pub/software/scm/git/$package-$version.tar.gz
tar xzf $package-$version.tar.gz
cd $package-$version &amp;amp;&amp;amp; ./configure --prefix=/usr/local &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;List the gems you have installed now:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem list
# I had a handful of gems that had been installed in strange places, and were still being seen by the new MacPorts install of ruby and gem.  Knowing that at least come of them were compiled, and knowing that I didn't want any issues I uninstalled all but gemcutter.
sudo gem uninstall RedCloth # ... and the rest
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Update the one or two gems you still have:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo gem update
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install rvm and some rubies.  Why so many rubies?  I happen to like rubies.  I also want to be able to test and benchmark against different rubies.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo gem install rvm
rvm install ruby-1.8.6-p399
rvm install ruby-1.8.7-p249
rvm install ruby-1.9.1-p378
rvm install ruby-1.9.2-preview1
rvm install rbx
rvm install ree
rvm install jruby
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Set one of the precious rubies to be a default:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm 1.8.7 --default # either 1.9.1 or 1.8.7 is most common
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I created several gemsets for several projects.  This creates complete insulation and isolation for the dependencies of my projects.  Another good option is to create gemsets for different versions of rails, or you could even do both.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm gemset create project1
rvm gemset create project2
rvm gemset create project3
rvm gemset create project4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Switch to using that gemset:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm 1.8.7%project1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you are working on a project that uses a version of rails prior to 2.3 then rubygems versions newer than 1.3.5 may not work.  rvm seems to sometimes install rubygems 1.3.6, and I have a project on rails 2.2.3 so I needed to set my 1.8.7 rvm ruby back to gem 1.3.5:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd ~/.rvm/src
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xzf rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb
cd ~/.rvm
rm -rf rubygems-1.3.5.tgz
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then install that project&#8217;s gem dependencies that are needed pre-rake gems:install!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install rails -v2.2.3 # or whatever version the project uses
gem install ...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then create the development and test databases for the project.&lt;/p&gt;

&lt;p&gt;Then rake gems:install&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rake gems:install
RAILS_ENV=test rake gems:install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install MySQL ruby bindings gem into each gemset that needs it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Options:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo port install freeciv # :)
sudo port install Pallet
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2009-11-18:7</id>
    <published>2009-11-18T02:47:00Z</published>
    <updated>2011-04-26T15:25:12Z</updated>
    <category term="Rails Blog"/>
    <category term="decimal"/>
    <category term="float"/>
    <category term="mysql"/>
    <link href="http://www.peterboling.com/2009/11/18/rails-money-float-decimal" rel="alternate" type="text/html"/>
    <title>Rails, Money, Float, Decimal</title>
<summary type="html">&lt;p&gt;The problems of using floats to represent monetary values have been well discussed elsewhere.  So it sufficeth me to say, &#8220;do not ever do it&#8221;.  Now if you are confronted with this haunting bit of code (written by someone else, of course), and want to correct the elusive $35.000000000000000001 you are charging people then I have good news!  It can be done, but the road is not paved.  These are the four biggest bumps I&#8217;ve run into. They might apply to other styles of AR stores, but these tips are from my experiences with MySQL.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;The problems of using floats to represent monetary values have been well discussed elsewhere.  So it sufficeth me to say, &#8220;do not ever do it&#8221;.  Now if you are confronted with this haunting bit of code (written by someone else, of course), and want to correct the elusive $35.000000000000000001 you are charging people then I have good news!  It can be done, but the road is not paved.  These are the four biggest bumps I&#8217;ve run into. They might apply to other styles of AR stores, but these tips are from my experiences with MySQL.&lt;/p&gt;
&lt;p&gt;The problems of using floats to represent monetary values have been well discussed elsewhere.  So it sufficeth me to say, &#8220;do not ever do it&#8221;.  Now if you are confronted with this haunting bit of code (written by someone else, of course), and want to correct the elusive $35.000000000000000001 you are charging people then I have good news!  It can be done, but the road is not paved.  These are the four biggest bumps I&#8217;ve run into. They might apply to other styles of AR stores, but these tips are from my experiences with MySQL.&lt;/p&gt;


	&lt;h2&gt;Problem #1.&lt;/h2&gt;


	&lt;p&gt;MySQL: Decimal columns with default values are marshalled into schema.rb and fixtures as nasty Ruby object dumps, which start with the # character, which is a comment in ruby, which breaks the entire file, and thereby breaks any part of the app that reads those files.&lt;/p&gt;


	&lt;h3&gt;Solution to Problem #1:&lt;/h3&gt;


A. In config/environment.rb:
&lt;pre&gt;&lt;code&gt;  config.active_record.schema_format = :sql&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;B. Delete db/schema.rb&lt;/p&gt;


C. In a terminal:
&lt;pre&gt;&lt;code&gt;rake db:structure:dump
rake db:test:clone_structure&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;D. Now you should be able to run your tests again.&lt;/p&gt;


	&lt;h2&gt;Problem #2.&lt;/h2&gt;


MySQL: Writing the migration, I thought this would be fine to convert a column that had been previously defined with a comment and a default:
&lt;pre&gt;&lt;code&gt;    change_column :auction_payments, :transaction_amount, :decimal, :precision =&amp;gt; 9, :scale =&amp;gt; 2&lt;/code&gt;&lt;/pre&gt;
But when I ran it the :default setting was lost, and the :comment was lost.  I imagine other settings I might have had would&#8217;ve been lost as well.  The &lt;span class=&quot;caps&quot;&gt;DATA&lt;/span&gt; in the column was fine, but the column itself had lost some settings (which caused specs to fail, because those defaults are there for a reason!)&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Solution to Problem #2:&lt;/h3&gt;


	&lt;p&gt;A. Make sure you replay all the current column settings that still apply to the change_column method.  Yes, you do have to restate all those defaults, and comments, etc.&lt;/p&gt;


	&lt;h2&gt;Problem #3:&lt;/h2&gt;


	&lt;p&gt;Rails: When the value in a decimal column comes back to rails as a 0 instead of typecasting it as 0:BigDecimal it gets typecast as 0:fixnum.  If your code involving money does division then you will end up with numbers that need to be rounded with .round(2).  If that code meets one of these 0:Fixnums, there will be a nasty explosion, because FixNum does not have a round method.&lt;/p&gt;


	&lt;h3&gt;Solution to Problem #3:&lt;/h3&gt;


	&lt;p&gt;(Please let me know if you have a better solution):&lt;/p&gt;


A. Create a new initializer file in config/intializers/fixnum_rounding_fix.rb and put this in it:
&lt;pre&gt;&lt;code&gt;# When Our DECIMAL database columns have a value of 0 rails is casting the value to Fixnum, instead of a BigDecimal.
# This causes the round() method we call on instances of BigDecimal to fail.
# Fixnum does not have a round method with an argument, so this should not pose a problem
# Essentially if we are calling round on a fixnum, it is because we expected a BigDecimal, and it needs to be a BigDecimal.
Fixnum.class_eval do
  def round(*args)
    BigDecimal(&quot;#{self}&quot;)
  end
end&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Problem #4:&lt;/h2&gt;


	&lt;p&gt;All the old code that used the old Float columns and had been hacked somehow to work almost reliably with forced rounding (faked precision) is now broken!&lt;/p&gt;


	&lt;h3&gt;Solution to Problem #4:&lt;/h3&gt;


	&lt;p&gt;A. Search the project for usages of the custom hackety-hack rounding method that was being used, in my case it was my_number.round_with_precision(2), and rethink the math.  Usually I was able to just replace my_number.round(2).&lt;/p&gt;


	&lt;p&gt;B. Run the specs (you do have tests, right?) and make sure they all still pass.  If they do not, then perhaps they&#8217;re not testing what they need to be testing?&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2009-11-13:6</id>
    <published>2009-11-13T20:33:00Z</published>
    <updated>2011-04-26T15:25:20Z</updated>
    <category term="Rails Blog"/>
    <category term="gems"/>
    <link href="http://www.peterboling.com/2009/11/13/unpack-your-unruly-gems" rel="alternate" type="text/html"/>
    <title>Unpack your unruly gems!</title>
<summary type="html">&lt;p&gt;Unpacking Gems doesn&#8217;t always work in some projects for various annoying reasons.&lt;/p&gt;


	&lt;p&gt;So this is just my hammer for the nail.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Unpacking Gems doesn&#8217;t always work in some projects for various annoying reasons.&lt;/p&gt;


	&lt;p&gt;So this is just my hammer for the nail.&lt;/p&gt;
Some gems really don&#8217;t like to be unpacked&#8230; see:
&lt;pre&gt;&lt;code&gt;
def muck_gems
  ['capistrano_mailer','super_exception_notifier','sanitize_email','csv_pirate']
end

# execute commands in a different directory
def inside(dir, &#38;block)
  FileUtils.cd(dir) { block.arity == 1 ? yield(dir) : yield }
end

desc &quot;unpacks all muck gems into vendor/gems using versions installed on the local machine.&quot; 
task :unpack do
  gem_path = File.join(File.dirname(__FILE__), 'vendor', 'gems')
  FileUtils.mkdir_p(gem_path) unless File.exists?(gem_path)
  inside gem_path do
    muck_gems.each do |gem_name|
      system(&quot;gem unpack #{gem_name}&quot;)
      #Don't want it in vendor/gems, needs to be in gem's own folder, and that's harder to achieve
      dir = Dir.entries(gem_path).select {|x| x.match(gem_name)}.first
      system(&quot;gem specification #{gem_name} &amp;gt; #{gem_path}/#{dir}/.specification&quot;)
    end
  end
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;References: &lt;a href=&quot;http://www.justinball.com/2009/09/10/gemsunpack-for-gems-that-dont-unpack/&quot;&gt;justinball.com&lt;/a&gt;
&lt;a href=&quot;http://metaclass.org/2009/4/13/rake-gems-unpack&quot;&gt;metaclass.org&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2009-11-04:5</id>
    <published>2009-11-04T15:58:00Z</published>
    <updated>2011-04-26T15:25:28Z</updated>
    <category term="Personal Blog"/>
    <category term="cherub"/>
    <category term="tof"/>
    <link href="http://www.peterboling.com/2009/11/4/my-cherub" rel="alternate" type="text/html"/>
    <title>My Cherub</title>
<content type="html">
            &lt;p&gt;My little cherub of a daughter turned one year old just three weeks ago.  She also has a congenital heart disease called tetralogy of fallot.  Two days ago we were went down to Riley Children&#8217;s Hospital and had her heart tested.  When we met with the doctor afterwards we learned the unsettling news that she would need another open heart surgery, and that it would need to be soon.  She has been taking a beta blocker to calm her heart down, and we were hoping that it would slow the growth of the muscle, and lower the pressure at the pulmonary artery, because it was four times what is healthy.  Instead it is now eight times what is healthy.  That might explain why she turned blue-purlpe, for a few minutes, two weeks ago.  It might also have been a factor in the seizure she appeared to have last week.  So on Earl&#8217;s birthday she will be having her second open heart surgery.  This has been a difficult trial for my wife and I. I know that God is in control, and I put my faith in him, and his will for us.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2009-10-12:4</id>
    <published>2009-10-12T07:06:00Z</published>
    <updated>2011-04-26T15:25:39Z</updated>
    <category term="Contact"/>
    <category term="contact"/>
    <link href="http://www.peterboling.com/2009/10/12/contact" rel="alternate" type="text/html"/>
    <title>Contact</title>
<content type="html">
            &lt;p&gt;My cell is the best way to get a hold of me.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;FaceBook:     &lt;a href=&quot;http://www.facebook.com/peter.boling&quot;&gt;http://www.facebook.com/peter.boling&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;GitHub:         &lt;a href=&quot;http://github.com/pboling/&quot;&gt;http://github.com/pboling/&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Twitter:         &lt;a href=&quot;http://twitter.com/galtzo&quot;&gt;http://twitter.com/galtzo&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;cell: 765-760-2012&lt;/li&gt;
		&lt;li&gt;email: peter.boling@peterboling.com&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;AIM&lt;/span&gt;: djpeteplzdance&lt;/li&gt;
		&lt;li&gt;jabber: peter.boling@gmail.com    &lt;/li&gt;
		&lt;li&gt;skype: peter.boling&lt;/li&gt;
		&lt;li&gt;lang:  English, Spanish, Portuguese&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://www.peterboling.com/">
    <author>
      <name>peterboling</name>
    </author>
    <id>tag:www.peterboling.com,2009-10-12:3</id>
    <published>2009-10-12T06:54:00Z</published>
    <updated>2011-04-26T15:25:46Z</updated>
    <category term="Portfolio"/>
    <category term="neighborino"/>
    <category term="sagebit"/>
    <link href="http://www.peterboling.com/2009/10/12/portfolio" rel="alternate" type="text/html"/>
    <title>Portfolio</title>
<content type="html">
            &lt;p&gt;I work on &lt;a href=&quot;http://Neighborino.com&quot;&gt;Neighborino.com&lt;/a&gt;, which is a neighborhood socialization, &lt;span class=&quot;caps&quot;&gt;HOA&lt;/span&gt; management, and communication tool.  My relationship with Neighborino is a profit sharing model, so the cost to them is minimal as they are in the launch phase.  Check out the &lt;a href=&quot;http://demo.neighborino.com&quot;&gt;demo site&lt;/a&gt; to see a functioning &lt;span class=&quot;caps&quot;&gt;HOA&lt;/span&gt; website.&lt;/p&gt;


As a software engineer for the State of Indiana Legislative Services Agency I worked on:
	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.in.gov/legislative/iac/irtoc.htm&quot;&gt;Indiana Registry&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;As a partner at &lt;a href=&quot;http://Sagebit.com&quot;&gt;Sagebit.com&lt;/a&gt; I was a major part of developing the following sites:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://asmallworld.net&quot;&gt;A Small World&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;https://timeperks.com&quot;&gt;Timeperks&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://www.radiobookmark.com/&quot;&gt;Radio Bookmark&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://Cartabuzz.com&quot;&gt;Carta Buzz&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://MonkeyStub.com&quot;&gt;Monkey Stub&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://Sagebit.com&quot;&gt;Sagebit.com&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://YetiMail.com&quot;&gt;Yeti Mail&lt;/a&gt; (Currently Offline)&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://TeamClip.com&quot;&gt;Team Clip&lt;/a&gt; (Currently Offline)&lt;/li&gt;
	&lt;/ul&gt;


As an independent contractor I&#8217;ve worked on the following websites:
	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://alpha.biblegateway.com&quot;&gt;Bible Gateway&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I have worked on several other sites that I am unable to name publicly.&lt;/p&gt;
          </content>  </entry>
</feed>

