Skip to content

Commit

Permalink
Some tweaks and added CNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
anildigital committed May 1, 2009
1 parent 29f6efa commit 45676d7
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 168 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
_site
24 changes: 24 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<div class="title">
<a href="/">Anil Wadghule</a>
<a class="extra" href="/">home</a>
<a class="extra" href="/archive.html">archive</a>
<a class="extra" href="/about.html">about</a>
<a class="extra" href="/resume.html">resume</a>
<a class="extra" href="/contact.html">contact</a>
</div>

{{ content }}
Expand All @@ -44,9 +48,29 @@
</a>
</div>
</div>
<div class="footer2" >
<a href="https://github.com/anildigital/anildigital.github.com/tree">managed by github</a> ¤ <a href="http://github.com/mojombo/jekyll">generated by jekyll</a> ¤ <a href="http://creativecommons.org/licenses/by-sa/3.0/us/">licensed by creative commons</a> ¤ <a href="http://slicehost.com">served by slicehost</a>
</div>
</div>



<script type="text/javascript">
//<![CDATA[
(function() {
var links = document.getElementsByTagName('a');
var query = '?';
for(var i = 0; i < links.length; i++) {
if(links[i].href.indexOf('#disqus_thread') >= 0) {
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
}
}
document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/anilsweblog/get_num_replies.js' + query + '"></' + 'script>');
})();
//]]>
</script>


</body>

</html>
7 changes: 7 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<h1> {{page.title}} </h1>
<p class="meta">{{ page.date | date:"%B %d, %Y" }}</p>
{{ content }}
<div>
<a href="{{ page.url }}#disqus_thread">View Comments</a>
</div>
</div>
<div>

<div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/anilsweblog/embed.js"></script><noscript><a href="http://anilsweblog.disqus.com/?url=ref">View the discussion thread.</a></noscript><a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
</div>


Expand Down
86 changes: 45 additions & 41 deletions _posts/2008-12-30-installing-mysql-gem-on-mac-leopard.markdown
Original file line number Diff line number Diff line change
@@ -1,54 +1,58 @@
---
wordpress_id: 343
title: Installing MySQL gem on Mac (Leopard)
wordpress_url: http://anilwadghule.com/blog/?p=343
layout: post
---
---
wordpress_id: 343
title: Installing MySQL gem on Mac (Leopard)
wordpress_url: http://anilwadghule.com/blog/?p=343
layout: post
---
If you are getting following error on trying to install mysql gem on mac (Leopard, in my case)
<pre>$ sudo gem install mysql
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:

<pre class="terminal">
$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.</pre>

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
</pre>


Try following
<pre>$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions.  This could take a while...

<pre class="terminal">
$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed</pre>
1 gem installed
</pre>

The above thing is correct only if you have installed 32 bit MySQL dmg. If you have installed 64 bit MySQL dmg, you are sure to get following error on running rails server or any ruby app using mysql gem
<pre>dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Expected in: dynamic lookup

dyld: Symbol not found: _mysql_init
<pre class="terminal">
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Expected in: dynamic lookup

Trace/BPT trap</pre>

dyld: Symbol not found: _mysql_init Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle Expected in: dynamic lookup


Trace/BPT trap
</pre>

The reason is that MySQL Ruby gem build is 32 bit one and it doesn't work well with 64 bit MySQL dmg

To solve all this, uninstall installed 64 bit MySQL dmg as follows ( There is no good way to uninstall MySQL from Mac other than below)
<pre> * sudo rm /usr/local/mysql
* sudo rm -rf /usr/local/mysql*
* sudo rm -rf /Library/StartupItems/MySQLCOM
* sudo rm -rf /Library/PreferencePanes/My*
* edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
* sudo rm -rf /Library/Receipts/mysql*
* sudo rm -rf /Library/Receipts/MySQL*

* http://akrabat.com/2008/09/11/uninstalling-mysql-on-mac-os-x-leopard/</pre>
Now download and install 32 bit MySQL dmg (<a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg">http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg</a>)

<pre class="terminal">
* sudo rm /usr/local/mysql
* sudo rm -rf /usr/local/mysql*
* sudo rm -rf /Library/StartupItems/MySQLCOM
* sudo rm -rf /Library/PreferencePanes/My*
* edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
* sudo rm -rf /Library/Receipts/mysql*
* sudo rm -rf /Library/Receipts/MySQL*
* http://akrabat.com/2008/09/11/uninstalling-mysql-on-mac-os-x-leopard/
</pre>

Now download and install 32 bit MySQL dmg (http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg)
Loading

0 comments on commit 45676d7

Please sign in to comment.