<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ไอเอินบล๊อก &#187; mamp</title>
	<atom:link href="http://www.iearn.in.th/tag/mamp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iearn.in.th</link>
	<description>Just Play and Just Knowledge</description>
	<lastBuildDate>Fri, 05 Aug 2011 15:10:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Working with php in mac 10.5.X</title>
		<link>http://www.iearn.in.th/2008/04/29/working-with-php-in-mac-105x/</link>
		<comments>http://www.iearn.in.th/2008/04/29/working-with-php-in-mac-105x/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 23:05:19 +0000</pubDate>
		<dc:creator>nolifelover</dc:creator>
				<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apachetcl]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Enable]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[Marc Liyanage]]></category>

		<guid isPermaLink="false">http://www.jaideawhosting.com/nolifelover/?p=127</guid>
		<description><![CDATA[สวัสดีครับสำหรับวันนี้เมื่อผมต้องการเขียน php บน mac เนี่ยผมต้องทำอย่างไรครับสำหรับที่จริงแล้วเรามีทางเลือกได้หลายทางครับ จะเอาที่มีเป็น package อยู่แล้วมา install หรือนั่ง compile apache ใหม่ก็แล้วแต่ครับ สำหรับวิธีที่ผมเลือกคือเลือกที่จะใช้ apache ที่มีอยู่ใน 10.5.x อยู่แล้วครับ สำหรับใครที่อยากจะลงโดยไม่ต้องยุ่งกับอะไรสามารถเลือก MAMP, XAMPP or Marc Liyanage ได้ครับ สำหรับใครที่ต้องการใช้ที่ติดกับ mac อยู่แล้วก็ตามมาเลยครับ Enable Developer Tools     คือการเปิดสิทธิให้สามารถใช้ root user ได้ เพื่อไม่ให้เกิดปัญหาเรื่องการใช้งานในการ access file permission  สำหรับวิธีการให้ไปที่ Menu -&#62;Go -&#62;Utilities-&#62; Directory Utility จากนั้นให้ทำการเลือก ปลดล็อกไฟล์ตรงรูปกุญแจแล้วจะมีการ Authenticate เพื่อตรวจสอบสิทธิการใช้ ให้เราใส่ password ลงไป หลังจากนั้นให้ไปที่ menu-&#62;edit-&#62;enable root users จะมีการถามพาสเวิร์ดให้เราใส่ [...]]]></description>
			<content:encoded><![CDATA[<p>สวัสดีครับสำหรับวันนี้เมื่อผมต้องการเขียน php บน mac เนี่ยผมต้องทำอย่างไรครับสำหรับที่จริงแล้วเรามีทางเลือกได้หลายทางครับ จะเอาที่มีเป็น package อยู่แล้วมา install หรือนั่ง compile apache ใหม่ก็แล้วแต่ครับ สำหรับวิธีที่ผมเลือกคือเลือกที่จะใช้ apache ที่มีอยู่ใน 10.5.x อยู่แล้วครับ สำหรับใครที่อยากจะลงโดยไม่ต้องยุ่งกับอะไรสามารถเลือก <a href="http://www.mamp.info/en/index.php">MAMP</a>, <a href="http://www.apachefriends.org/en/xampp-macosx.html">XAMPP</a> or <a href="http://www.entropy.ch/software/macosx/php/">Marc Liyanage</a> ได้ครับ สำหรับใครที่ต้องการใช้ที่ติดกับ mac อยู่แล้วก็ตามมาเลยครับ</p>
<p><span id="more-127"></span></p>
<p style="text-align: left;"><strong>Enable Developer Tools<br />
<span style="font-weight: normal;">    คือการเปิดสิทธิให้สามารถใช้ root user ได้ เพื่อไม่ให้เกิดปัญหาเรื่องการใช้งานในการ access file permission  สำหรับวิธีการให้ไปที่ Menu -&gt;Go -&gt;Utilities-&gt; Directory Utility จากนั้นให้ทำการเลือก ปลดล็อกไฟล์ตรงรูปกุญแจแล้วจะมีการ Authenticate เพื่อตรวจสอบสิทธิการใช้ ให้เราใส่ password ลงไป หลังจากนั้นให้ไปที่ menu-&gt;edit-&gt;enable root users จะมีการถามพาสเวิร์ดให้เราใส่ password ของ root user ก้เป็นอันว่าเาร็จเรียบรอยในการแก้ให้สามารถเปิดสิทธิของ root ในการใช้งานเพื่อเพิ่มประสิทธิภาพในการพัฒนาโปรแกรม<br />
<a href="http://www.iearn.in.th/wp-content/uploads/2008/04/picture-12.png"><img class="alignnone size-medium wp-image-128" title="Utilities" src="http://www.jaideawhosting.com/nolifelover/wp-content/uploads/2008/04/picture-12-262x300.png" alt="utilities munu mac" width="262" height="300" /><img class="alignnone size-medium wp-image-129" title="picture-21" src="http://www.jaideawhosting.com/nolifelover/wp-content/uploads/2008/04/picture-21-300x173.png" alt="" width="300" height="173" /><img class="alignnone size-medium wp-image-130" title="picture-32" src="http://www.jaideawhosting.com/nolifelover/wp-content/uploads/2008/04/picture-32-300x180.png" alt="" width="300" height="180" /></a><a href="http://www.iearn.in.th/wp-content/uploads/2008/04/picture-41.png"><img class="alignnone size-medium wp-image-131" title="picture-41" src="http://www.jaideawhosting.com/nolifelover/wp-content/uploads/2008/04/picture-41-300x188.png" alt="" width="300" height="188" /></a><br />
 </span></strong></p>
<p style="text-align: left;"><strong>Editing Configuration Files</strong><br />
    ขั้นตอนนี้จะทำการแก้ไขไฟลื con-fig ของ apache ที่มีอยุ่เดิมโดยเราสามารถแก้ไขได้หลายวิธีหากใครถนัด nano vi ก็สามารถใช้ได้แ่หากต้องการ user interface แนะนำให้ใช้ <a href="http://www.barebones.com/">BBEdit</a> หรือ <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a>  สำหรับในที่นี้ผมใช้ TextMate ซึ่งไม่ฟรีเลยไม่แนะนำให้ใช้ครับ หลังจากนั้นให้เราไปที่ menu-&gt;Go -&gt; Go to Folder แล้วใส่ค่า /etc/apache/ เพื่อไปยัง directory นั้นเมื่อถึงแล้วจะเห็นไฟล์ไม่กี่ไฟล์ครัล แต่ที่สำคัญคือ httpd.conf ซึ่งเราต้องทำการแก้ไข โดยการเปิดด้วย editor ทีเรามีอยู่ครับ จากนั้นหาบรรทัดที่ชื่อ <br />
#LoadModule php5_module libexec/apache2/libphp5.so<br />
เอาเครื่องหมาย # ออกเป็นอันเรียบร้อยครับ <br />
<img class="alignnone size-medium wp-image-133" title="picture-61" src="http://www.jaideawhosting.com/nolifelover/wp-content/uploads/2008/04/picture-61-279x300.png" alt="" width="279" height="300" /><a href="http://www.iearn.in.th/wp-content/uploads/2008/04/picture-51.png"><img class="alignnone size-medium wp-image-132" title="picture-51" src="http://www.jaideawhosting.com/nolifelover/wp-content/uploads/2008/04/picture-51-300x186.png" alt="" width="300" height="186" /></a> </p>
<p style="text-align: left;"><strong>Starting Apache </strong><br />
    สำหรับการเริ่มเจ้า apache ที่เราได้ทำหารแก้ไขสามารถเข้าไปสั่งให้รันได้ที่ System references -&gt; Sharing -&gt; Web Sharing ก็เป็นอันเสร็จเรียบร้อยสำหรับการสั่งรันเจ้า apache หากใครที่ได้ทำการรันไว้แล้วสามารถใช้คำสั่ง<br />
$sudo apachetcl restart </p>
<p style="text-align: left;">เป็นอันว่าเรียบร้อยสำหรับการใช้ php บน mac ใช้งานได้</p>
<p style="text-align: left;">Link <a href="http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/">http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/</a></p>

<p class="sayac_bilgi">11 views</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iearn.in.th/2008/04/29/working-with-php-in-mac-105x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on rails with MAMP Pro</title>
		<link>http://www.iearn.in.th/2008/04/16/ruby-on-rails-with-mamp-pro/</link>
		<comments>http://www.iearn.in.th/2008/04/16/ruby-on-rails-with-mamp-pro/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 14:23:51 +0000</pubDate>
		<dc:creator>nolifelover</dc:creator>
				<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[E-Ruby]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[WEBrick]]></category>

		<guid isPermaLink="false">http://www.jaideawhosting.com/nolifelover/?p=68</guid>
		<description><![CDATA[สำหรับหลายคนที่ต้องการเริ่มทำงานบนแมคเหมือนผม(ลงแมคเท่สำเร็จเลยลองย้ายมาดู) มือใหม่ก็ยากลำบบากหน่อยครับ กว่าจะได้ตรงนั้น กว่าจะทำตรงนี้ได้ วันนี้ก็เลยอยากจะมาแนะนำการเขียน ruby on rails บน mac กันครับโดยที่ใช้ mysql ของ mamp pro ครับเพราะว่าผมต้องเขียน php ด้วยเลยจำเป็นต้องใช้ Mamp pro เนื่องากบอกแล้วว่ามือใหม่หัดขับ mac os จริงๆ ครับ สำหรับวันนี้จะแนะนำในส่วนของ ruby on rails โดย ใช้ netbeans 6.01 เป็น editor ครับ 1. สำหรับคนที่ยังไม่มี netbeans สามารถเข้าโหลดตัวลงได้ที่ http://www.netbeans.org/ ครับ 2. สำหรับ Mamp Pro ผมแนะนำให้เข้าไปดูที่ http://www.Macupdate.com ครับเพราะว่ามีในส่วนของโปรแกรมในแมคเยอะเลยครับ 3. เมื่อทำการดาวโหลดมาแล้วให้ทำการ install ทั้ง 2 โปรแกรมเลยครับ [...]]]></description>
			<content:encoded><![CDATA[<p>สำหรับหลายคนที่ต้องการเริ่มทำงานบนแมคเหมือนผม(ลงแมคเท่สำเร็จเลยลองย้ายมาดู) มือใหม่ก็ยากลำบบากหน่อยครับ กว่าจะได้ตรงนั้น กว่าจะทำตรงนี้ได้ วันนี้ก็เลยอยากจะมาแนะนำการเขียน ruby on rails บน mac กันครับโดยที่ใช้ mysql ของ mamp pro ครับเพราะว่าผมต้องเขียน php ด้วยเลยจำเป็นต้องใช้ Mamp pro เนื่องากบอกแล้วว่ามือใหม่หัดขับ mac os จริงๆ ครับ สำหรับวันนี้จะแนะนำในส่วนของ ruby on rails โดย ใช้ netbeans 6.01 เป็น editor ครับ<br />
1. สำหรับคนที่ยังไม่มี netbeans สามารถเข้าโหลดตัวลงได้ที่ <a href="http://www.netbeans.org/">http://www.netbeans.org/ </a>ครับ<br />
2. สำหรับ Mamp Pro ผมแนะนำให้เข้าไปดูที่ <a href="http://www.Macupdate.com ">http://www.Macupdate.com </a>ครับเพราะว่ามีในส่วนของโปรแกรมในแมคเยอะเลยครับ<br />
3. เมื่อทำการดาวโหลดมาแล้วให้ทำการ install ทั้ง 2 โปรแกรมเลยครับ ในที่นี้ไม่ขออธิบายละกันครับ<span id="more-233"></span><br />
4. เมื่อเสร็จแล้วสั่งรันโปรแกรมขึ้นมาเลยครับ และต่อไปจะเป็นการตั้่งค่าให้ rails เรารู้จัก mysql ของ mamp<br />
5. ใช้โปรแกรม netbeans สร้างโปรแจค ruby on rails มาซักโปรแจคครับ หลังจากนั้นจะตั้งค่าในส่วนของติดต่อฐานข้อมูล</p>
<pre lang="ruby' line=">development:
  adapter: mysql
  database: CommCenter_development
  username: root
  password: thiev5iP
  host: localhost</pre>
<p>6. ถ้าเราสั่งรันเลยเนี่ยจะได้หน้าตาประมาณนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Booting WEBrick...
<span style="color:#006600; font-weight:bold;">/</span>Users<span style="color:#006600; font-weight:bold;">/</span>mLri<span style="color:#006600; font-weight:bold;">/</span>Project<span style="color:#006600; font-weight:bold;">/</span>jruby<span style="color:#006600; font-weight:bold;">-</span>1.1RC2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>activerecord<span style="color:#006600; font-weight:bold;">-</span>2.0.2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>active_record<span style="color:#006600; font-weight:bold;">/</span>vendor<span style="color:#006600; font-weight:bold;">/</span>mysql.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">107</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`real_connect': No such file or directory - /tmp/mysql.sock (Errno::ENOENT)
        from /Users/mLri/Project/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `</span>connect<span style="color:#996600;">'
        from /Users/mLri/Project/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'</span>
        from <span style="color:#006600; font-weight:bold;">/</span>Users<span style="color:#006600; font-weight:bold;">/</span>mLri<span style="color:#006600; font-weight:bold;">/</span>Project<span style="color:#006600; font-weight:bold;">/</span>jruby<span style="color:#006600; font-weight:bold;">-</span>1.1RC2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>activerecord<span style="color:#006600; font-weight:bold;">-</span>2.0.2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>active_record<span style="color:#006600; font-weight:bold;">/</span>connection_adapters<span style="color:#006600; font-weight:bold;">/</span>mysql_adapter.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">88</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`new'
        from /Users/mLri/Project/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `</span>mysql_connection<span style="color:#996600;">'
        from /Users/mLri/Project/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='</span>
        from <span style="color:#006600; font-weight:bold;">/</span>Users<span style="color:#006600; font-weight:bold;">/</span>mLri<span style="color:#006600; font-weight:bold;">/</span>Project<span style="color:#006600; font-weight:bold;">/</span>jruby<span style="color:#006600; font-weight:bold;">-</span>1.1RC2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>activerecord<span style="color:#006600; font-weight:bold;">-</span>2.0.2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>active_record<span style="color:#006600; font-weight:bold;">/</span>connection_adapters<span style="color:#006600; font-weight:bold;">/</span>abstract<span style="color:#006600; font-weight:bold;">/</span>connection_specification.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">259</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`retrieve_connection'
        from /Users/mLri/Project/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `</span>connection<span style="color:#996600;">'
        from /Users/mLri/Project/jruby-1.1RC2/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2438:in `quoted_table_name'</span>
         ... <span style="color:#006666;">16</span> levels...
        from <span style="color:#006600; font-weight:bold;">/</span>Users<span style="color:#006600; font-weight:bold;">/</span>mLri<span style="color:#006600; font-weight:bold;">/</span>Project<span style="color:#006600; font-weight:bold;">/</span>jruby<span style="color:#006600; font-weight:bold;">-</span>1.1RC2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>rails<span style="color:#006600; font-weight:bold;">-</span>2.0.2<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>commands<span style="color:#006600; font-weight:bold;">/</span>server.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">38</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`require'
        from /Users/mLri/Project/jruby-1.1RC2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `</span><span style="color:#CC0066; font-weight:bold;">require</span><span style="color:#996600;">'
        from script/server:3</span></pre></div></div>

<p>7. สำหรับการแก้ไขในส่วนนี้เราสามารถทำได้โดย</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">sudo ln <span style="color:#006600; font-weight:bold;">-</span>s <span style="color:#006600; font-weight:bold;">/</span>Applications<span style="color:#006600; font-weight:bold;">/</span>MAMP<span style="color:#006600; font-weight:bold;">/</span>tmp<span style="color:#006600; font-weight:bold;">/</span>mysql<span style="color:#006600; font-weight:bold;">/</span>mysql.<span style="color:#9900CC;">sock</span> <span style="color:#006600; font-weight:bold;">/</span>tmp<span style="color:#006600; font-weight:bold;">/</span>mysql.<span style="color:#9900CC;">sock</span></pre></div></div>


<p class="sayac_bilgi">30 views</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iearn.in.th/2008/04/16/ruby-on-rails-with-mamp-pro/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

