<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="http://rss.egloos.com/style/blog.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
	<title>Javascript Minimalism</title>
	<link>http://beizix.egloos.com</link>
	<description>Acid House를 카피하며 음악을 취미삼아 공부중인 어느 나그네입니다. 유익한 정보들을 이곳에 모아놓으려구요. </description>
	<language>ko</language>
	<pubDate>Sat, 17 Oct 2009 13:11:42 GMT</pubDate>
	<generator>Egloos</generator>
	<image>
		<title>Javascript Minimalism</title>
		<url>http://pds3.egloos.com/logo/200611/20/72/d0000972.jpg</url>
		<link>http://beizix.egloos.com</link>
		<width>80</width>
		<height>96</height>
		<description>Acid House를 카피하며 음악을 취미삼아 공부중인 어느 나그네입니다. 유익한 정보들을 이곳에 모아놓으려구요. </description>
	</image>
  	<item>
		<title><![CDATA[ 공통 - 브라우저별로 이벤트(event) 발생시 제공되는 자체기능 끄기 ]]> </title>
		<link>http://beizix.egloos.com/2441796</link>
		<guid>http://beizix.egloos.com/2441796</guid>
		<description>
			<![CDATA[ 
  FF 에서, 이미지를 누르고 드래그하면 이동한다. 이는 이미지를 쉽게 사용자 컴퓨터로 저장할 수 있도록 FF 에서 제공하는 기능이지만, 멀티브라우저상에서 드래그 앤 드롭 기능을 구현하려면 이 기본제공기능을 꺼야한다. <br><br>IE 에서도 이미지 드래그기능을 자체 제공하진 않지만, FF 와는 다른 여러 기능들을 제공한다. 즉, mousedown, mousemove, click 등 이벤트의 종류별로, 또 브라우저별로 지원되는 기능들이 가지각색이다. <br><br>UI 를 개발하는 사람의 입장에서는 이 모든 특별기능들이 꺼진 가장 기본의 상태에서 작업하는게 가장 이상적이다. 다음 함수로 가능하다.&nbsp;특별기능을 끈다는 의미에서&nbsp;&nbsp;turnoff_fx_event_func 라는 이름을 지었다. <br><br>// event 발생시 브라우저별로 자체 제공하는 특별기능 끄기.<br>var turnoff_fx_event_func = function (event) {<br>&nbsp;&nbsp;&nbsp; event = event || window.event;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;if (event.preventDefault) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event.preventDefault();&nbsp;&nbsp; // firefox/모질라에서 event 발생시 자체 제공하는 특별기능 끄기.<br>&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event.returnValue&nbsp; = false; // IE에서 event 발생시 자체 제공하는 특별기능 끄기.<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>};<br><br>다음과 같이 사용가능하다. mousedown 이벤트시를 예로 들겠다. <br><br>element.onmousedown = function (event) {<br>&nbsp;&nbsp;&nbsp;&nbsp;turnoff_fx_event_func(event);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;// ... your codes<br>&nbsp;&nbsp;&nbsp;&nbsp;// ....<br>};<br><br/><br/>tag : <a href="/tag/preventEvent" rel="tag">preventEvent</a>,&nbsp;<a href="/tag/returnValue" rel="tag">returnValue</a>			 ]]> 
		</description>
		<category>Javascript</category>
		<category>preventEvent</category>
		<category>returnValue</category>

		<comments>http://beizix.egloos.com/2441796#comments</comments>
		<pubDate>Mon, 05 Oct 2009 07:10:03 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Rails - table/column/model 등의 이름을 바꿀 때 유의할 점  ]]> </title>
		<link>http://beizix.egloos.com/2439341</link>
		<guid>http://beizix.egloos.com/2439341</guid>
		<description>
			<![CDATA[ 
  Rails 에서 table/column 등의 이름을 바꾸는게 쉽지 않다. 테이블의 이름이 곧 MVC 패턴의 여러 파일들의 Naming 규칙과 엮여있기때문이다. 다시 처음부터 개발하는게 편하지 않을까 생각도 들었지만 수정작업을 해보기로 결심하고 적용해본 결과, 이 방식이 그렇게 까다로운 작업이 아니라는걸 알게 되었다. &nbsp; <br />
<br />
table/column 등의 이름을 변경해야 한다면, /app 혹은 /test 폴더와 연관된 파일들도 수정해야함을 의미하며, 다음 위치에 존재하는 파일들을 바꾸어줘야 한다.&nbsp; <br />
<br />
 /app/*,&nbsp; <br />
/config/routes.rb, =&gt; (변경하려는 모델이 route.rb 에 사용되고 있다면) <br />
/test/fixtures/*, <br />
/test/functional/*, <br />
/test/unit/*<br />
<br />
* 라고 모든 파일을 말하는게 아니라, table 과 직접/간접적인 연관이 있는 파일들을 얘기한다. <br />
<br />
<br />
<font size="5"><span style="font-weight: bold;">step.1</span> 테이블 이름 변경하기</font><br />
<br />
1.1 urls 테이블을 sources 이름으로 변경하기. script 명령어로 migration 파일 생성하자.<br />
<br />
ruby script/generate migration rename_table_urls_to_sources<br />
<br />
1.2 생성된 파일을 다음처럼 편집한다.<br />
<br />
class RenameTableUrlsToSources &lt; ActiveRecord::Migration<br />
&nbsp; def self.up<br />
&nbsp;&nbsp;&nbsp; rename_table :urls, :sources<br />
&nbsp; end<br />
<br />
&nbsp; def self.down<br />
&nbsp;&nbsp;&nbsp; rename_table :sources, :urls<br />
&nbsp; end<br />
end<br />
<br />
1.3 migration 실행 <br />
<br />
rake db:migrate <br />
<br />
step 1 단계를 마치면, 실제 database 상에 table 이름이 변경된걸 확인할 수 있다. <br />
<br />
<br />
<font size="5"><span style="font-weight: bold;">step.2</span> 컬럼 이름 변경하기 <br />
<br />
</font>1.1 변경된 sources 테이블의 url 칼럼의 이름을 source 로 변경하자. script 명령어로 migration 파일 생성하자. <br />
ruby script/generate migration rename_column_url_to_source<br />
<br />
1.2 생성된 파일을 다음처럼 편집한다.<br />
<br />
class RenameColumnUrlToSource &lt; ActiveRecord::Migration<br />
&nbsp; def self.up<br />
&nbsp;&nbsp;&nbsp; rename_column :sources, :url, :source&nbsp;&nbsp; # sources 테이블의 url 칼럼을 source 라는 이름으로 바꾼다는 의미 :)<br />
&nbsp; end<br />
<br />
&nbsp; def self.down<br />
&nbsp;&nbsp;&nbsp; rename_column :sources, :source, :url<br />
&nbsp; end<br />
end<br />
<br />
1.3 migration 실행 <br />
<br />
rake db:migrate <br />
<br />
step 1 단계를 마치면, 실제 database 상에 column 이름이 변경된걸 확인할 수 있다. <br />
<br />
<br />
<font size="5"><span style="font-weight: bold;">step.3</span> 관련 파일 변경하기 <br />
<br />
</font>가장 중요한 단계이다. 위에서 언급한 경로를 다시 한번 확인해보자. <br />
<br />
/app/*,&nbsp; <br />
/config/routes.rb, =&gt; (변경하려는 모델이 route.rb 에 사용되고 있다면) <br />
/test/fixtures/*, <br />
/test/functional/*, <br />
/test/unit/*<br />
<br />
기존에 url 이란 model class 가 존재했다면, 다음과 같은 경로에 위치해 있을것이다. <br />
/app/models/url.rb <br />
위 파일의 이름부터 source.rb 로 바꿔줘야 하며, 내부 로직속에 수정된 내용들을 모두 변경해주어야 한다. 다른 폴더에 위치한 파일들도 마찬가지다. <br />
<br />
직접해보라. 그리 어렵지 않다  :) <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
			 ]]> 
		</description>
		<category>Ruby on Rails</category>

		<comments>http://beizix.egloos.com/2439341#comments</comments>
		<pubDate>Thu, 01 Oct 2009 10:07:53 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ FF - 자체적인 이미지, 앨리먼트 드래그 기능 끄기 ]]> </title>
		<link>http://beizix.egloos.com/2436854</link>
		<guid>http://beizix.egloos.com/2436854</guid>
		<description>
			<![CDATA[ 
  <a href="http://develobert.blogspot.com/2008/10/disable-firefox-image-drag.html"><br>http://develobert.blogspot.com/2008/10/disable-firefox-image-drag.html</a>&nbsp;<br><br>mousedown 이벤트 리스너 함수에 다음 코드를 추가하면 된다. <br><br>var callback = function(event){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(event.preventDefault)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event.preventDefault();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Other code...<br>}<br><br>끝~ 간단하다 <br><br>			 ]]> 
		</description>
		<category>Javascript</category>

		<comments>http://beizix.egloos.com/2436854#comments</comments>
		<pubDate>Mon, 28 Sep 2009 05:27:32 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ RoR : 기억해두어야 할 네이밍 규칙 ]]> </title>
		<link>http://beizix.egloos.com/2421604</link>
		<guid>http://beizix.egloos.com/2421604</guid>
		<description>
			<![CDATA[ 
  <br />
bookmarks 테이블과 tags 테이블은 서로 다대다 관계이다. <br />
이때 흔히들 bookmarks_tags 라는 이름으로 조인테이블을 만들게 된다. <br />
<br />
* bookmarks_tags 라는 이름으로 테이블을 생성하고 싶다면, 다음과 같은 이름으로 모델을 생성해야한다. <br />
<br />
ruby script/generate model<span style="font-weight: bold;"> bookmarksTag</span> bookmark_id:integer tag_id:integer <br />
<br />
위 명령어로 <span style="font-weight: bold;">bookmarks_tags</span> 테이블과&nbsp; <span style="font-weight: bold;">bookmarks_tag.rb</span> 모델 클래스가 생성된다.<br />
<br />
<br />
<br />
<br/><br/>tag : <a href="/tag/RubyonRails" rel="tag">RubyonRails</a>			 ]]> 
		</description>
		<category>Ruby on Rails</category>
		<category>RubyonRails</category>

		<comments>http://beizix.egloos.com/2421604#comments</comments>
		<pubDate>Tue, 08 Sep 2009 13:50:22 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 공통 - 자꾸 주변영역이 불필요하게 선택될때, ]]> </title>
		<link>http://beizix.egloos.com/2389713</link>
		<guid>http://beizix.egloos.com/2389713</guid>
		<description>
			<![CDATA[ 
  드래그앤드롭 구현시, 혹은 다른 여타 작업해서 <br>불필요하게 주변 영역이 선택되는 경우가있다. (IE, FF, Oprea 등)<br><br>특정영역이 선택되었다면, 그건 selection 이 가동되었다는 의미다. 그걸 해제해주면 된다. <br><br>if (document.selection &amp;&amp; document.selection.empty) { // IE, Opera<br>&nbsp;&nbsp;&nbsp; document.selection.empty();<br>} else if (window.getSelection) {&nbsp;// netscape (FF/Safari)<br>&nbsp;&nbsp;&nbsp;&nbsp;window.getSelection().removeAllRanges();<br>}<br>&nbsp;&nbsp;&nbsp;&nbsp;			 ]]> 
		</description>
		<category>Javascript</category>

		<comments>http://beizix.egloos.com/2389713#comments</comments>
		<pubDate>Mon, 03 Aug 2009 05:40:25 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Aptana RadRails- An error has occurred. See error log for more details  ]]> </title>
		<link>http://beizix.egloos.com/2377721</link>
		<guid>http://beizix.egloos.com/2377721</guid>
		<description>
			<![CDATA[ 
  RadRails 를 사용하다가  어느순간&nbsp; <br />
<br />
An error has occurred. See error log for more details<br />
<br />
위의 메세지가 떴다. 위 메세지로 대로 로그파일을 보려면,<br />
Perspective view 를 Plug-in Development 로 설정하면, 화면이 바뀌면서 아래 Error Log 탭이 보인다. <br />
<br />
에러메세지는 <br />
Problems occurred when invoking code from plug-in: "org.eclipse.jface".<br />
이었고, <br />
Stack Trace 는 아래와 같았다.<br />
<br />
java.lang.NoClassDefFoundError: com/aptana/ide/server/cloud/ui/Messages<br />
at com.aptana.ide.ssh.actions.SSHAction.selectionChanged(SSHAction.java:97)<br />
at org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:208)<br />
at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:280)<br />
at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:292)<br />
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)<br />
......<br />
<br />
해결방법은 다음과 같다. <br />
<br />
Perspective 메뉴를 Aptana 로 선택하고, Help메뉴의 하위 메뉴인 Aptena Help메뉴에서 Troubleshooting메뉴의 하위 메뉴인 Clean Configuration을 선택하며,<br />
이클립스가 다시 부팅되면서 문제가 해결된다.<br />
<br />
참조 : http://support.aptana.com/asap/browse/ROR-1258<br />
Same problems with Apatan Studio (with RadRails Plugin).<br />
After "Clean Configuartion" (Help --&gt; Aptana Help --&gt; Troubleshooting --&gt; Clean Configuration) the problem is solved in my installation.<br />
<br />
자세한 이유는 모르겠다. 별로 알고 싶지도 않다.<br />
<br />
<br />
<br />
			 ]]> 
		</description>
		<category>Ruby on Rails</category>

		<comments>http://beizix.egloos.com/2377721#comments</comments>
		<pubDate>Sun, 19 Jul 2009 15:39:18 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 우분투 alt+tab, alt+f2 키가 먹지 않을 때 해결법 ]]> </title>
		<link>http://beizix.egloos.com/2369146</link>
		<guid>http://beizix.egloos.com/2369146</guid>
		<description>
			<![CDATA[ 
  <br />
언제부터인가 우분투에서 alt+tab 이 먹지 않는 문제가 발생했다. 아마도 업데이트 후인거 같다. <br />
구글에서 해결책을 찾고자 검색해보면 compize setting manager 의 문제라는 글이 많은데 내 경우 Compize Setting Manager 를 설치해본적도 구경해본적두 없다. <br />
<br />
내 경우 다음과 같이 해결할 수 있었다. <br />
<br />
1. 기본설정 &gt; 키보드 &gt; 키 배치 텝에서 '키배치 옵션'을 클릭<br />
<br />
2. 목록중 '배치를 전환하는 키' 를 클릭하여 관련 목록들이 펼쳐지게 한다.<br />
<br />
3. '왼쪽 Alt' 항목이 체크되어 있을것이다. 이를 해제하고 창을 닫는다.<br />
<br />
4. 기본설정 &gt; 키보드 바로가기 &gt; 창관리 항목을 클릭하여 관련 목록을 펼친다.<br />
<br />
5. Move between windows, using a popup window 를 클릭하여 alt+tab 을 눌러주어 키를 등록한다. <br />
<br />
이제 alt + tab 을 사용할 수 있다. <br />
<br />
* <br />
위의 키보드 바로가기 목록중에서 데스크탑 항목에 Run a terminal 이있다. 이곳에 Alt + F2 를 등록하여, 터미널 창을 손쉽게 여닫을 수 있게하자. <br />
<br />
			 ]]> 
		</description>
		<category>우당탱 Ubuntu</category>

		<comments>http://beizix.egloos.com/2369146#comments</comments>
		<pubDate>Thu, 09 Jul 2009 15:23:37 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Ubuntu + eclipse + Aptana plugin 설치시 문제 해결법 ]]> </title>
		<link>http://beizix.egloos.com/2367306</link>
		<guid>http://beizix.egloos.com/2367306</guid>
		<description>
			<![CDATA[ 
  우분투 환경에서 eclipse와 aptana 플러그인 설치시 많은 오류가 발견됨을 경험했다. <br />
이클립스 로딩시 jre 버전이 안맞다는 메세지가 보이는 등 여러 오류가 있는데&nbsp; 이를 한번에 해결해줄 방법을 어느 외국사이트에서 찾았다. 본 포스트는 원문 사이트를 간소하게 조금의 설명을 곁들여 번역한 글이다. <br />
<br />
출처 - http://at-byte.com/technology/how-fix-eclipse-aptana-plugin-eclipse-ubuntu-linux<br />
<br />
발생하는 문제의 요인은 우분투에서 이클립스 설치시, GCJ( The GNU Compiler for Java )를 인스톨하고, 그것을 디폴트로 사용한다는데 있다. <br />
<br />
다음과 같이 처리하여 문제를 해결하라.<br />
<br />
1. 시넵틱 패키지 관리자를 열어라. <br />
아직 이클립스가 설치되지 않았다면, eclipse 로 검색을 하고 설치 체크 표시를 해둬라.<br />
<br />
2. sun java 로 검색하여, java-sun6-bin 와 java-sun6-jre 에도 체크 표시를 한뒤 설치를 하라. <br />
만약, 이미 설치되었다면, 재설치 체크를 하면 된다.<br />
<br />
3. 설치를 마쳤으면, 터미널 창을 열고 다음 명령어를 입력하라.<br />
sudo update-java-alternatives -s java-6-sun <br />
<br />
4. 그리고, 아래 명령어를 입력하면, Text editor 가 열릴 것이다.<br />
sudo -b gedit /etc/eclipse/java_home<br />
<br />
5. 열린 파일에 있는 내용을 모두 지우고, <br />
/usr/lib/jvm/java-6-sun 를 입력하고 저장한 후, 닫아라. <br />
<br />
그리고 이클립스를 실행해보면, Aptana 플러그인이 아무 문제없이 가동되는 걸 확인할수 있다 !!! <br />
또한 저자는 Aptana 플러그인의 문제뿐 만아니라, eclipse 가 가지고있던 여러문제들도 해결할 수 있었다고 한다.<br />
<br />
<br />
<br />
<br />
<br />
<br />
			 ]]> 
		</description>
		<category>우당탱 Ubuntu</category>

		<comments>http://beizix.egloos.com/2367306#comments</comments>
		<pubDate>Tue, 07 Jul 2009 17:47:46 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Ubuntu + Aptana Standalone 설치시 문제해결법 ]]> </title>
		<link>http://beizix.egloos.com/2366401</link>
		<guid>http://beizix.egloos.com/2366401</guid>
		<description>
			<![CDATA[ 
  1. Apnata Studio 를 다운받고 home 디렉토리 밑에 원하는 곳에 압축을 푼다 <br />
2. xulrunner 1.8.* 을 설치한다. (시넵틱 관리자를 이용하면 편하다)<br />
3. xulrunner가 설치된 위치를 확인한다. (시넵틱으로 설치했다면, <span><span>/usr/lib/xulrunner 에 설치가 된다</span></span>)<br />
4. AptanaStudio 실행 아이콘이 있는 곳에다 파일 하나를 생성한다. runAptana 라는 이름을 붙여주자.<br />
내용은 다음과 같다.<span><span><br />
<br />
</span></span><span><span>export&nbsp;MOZILLA_FIVE_HOME=/usr/lib/xulrunner <br />
/home/myUtils/devTools/aptana/aptana/AptanaStudio<br />
<br />
</span></span><span><span>MOZILLA_FIVE_HOME 는 xulrunner 가 설치된곳.<br />
</span></span><span><span>/home/myUtils/devTools/aptana/aptana/AptanaStudio 는 </span></span><span><span>AptanaStudio 실행아이콘이 있는 위치.<br />
<br />
5. 이제 runAptana 를 실행스크립트로 만들어준다<br />
chmod +x runAptana<br />
<br />
6. 실행<br />
./runAptana<br />
<br />
이제 aptana 가 실행된다.<br />
<br />
원문 - http://www.aptana.com/docs/index.php/Installing_Aptana_on_Linux<br />
<br />
</span></span><h1> <span class="mw-headline">Standard Installation Instructions</span></h1><p><span style="display: none;">x</span></p><a name="Setup_Aptana_Studio_1.2.1"></a><h3> <span class="mw-headline">Setup Aptana Studio 1.2.1</span></h3><p>Note: Aptana Studio 1.3.0 from Fresh Install does not require these changes.<span style="display: none;">x</span></p><ul><li> Unzip Aptana Studio to /usr/local/aptana. Note: If you installAptana Studio in a directory accessible only to the root user, you willneed to run it as root to install updates.</li><li> Install xulrunner 1.8.* (You can use Synaptic Package Manager to install this.)<ul><li> You can download Xulrunner 1.8 from <a href="https://developer.mozilla.org/En/XULRunner" class="external free" title="https://developer.mozilla.org/En/XULRunner" rel="nofollow">https://developer.mozilla.org/En/XULRunner</a></li><li> Once installed, make sure you $MOZILLA_FIVE_HOME is pointing to your xulrunner 1.8 dir</li><li> You may also need to install compat-libstdc++ if you arerunning into a libstdc++.so.5: cannot open shared object file: No suchfile or directory when running xulrunner-bin from command line.</li></ul></li><li> Check your <i>/usr/lib/xulrunner.</i>... and note the full name of <i>xulrunner</i>.  Is some case it is simply "xulrunner" while in other cases the name includes the version.</li><li> Create a script that sets up the Aptana Studio environment, call it runAptana:</li></ul><pre>export MOZILLA_FIVE_HOME=/usr/lib/xulrunner<br />
/usr/local/aptana/AptanaStudio<br />
</pre><ul><li> Make your script executable:</li></ul><pre>$ chmod +x runAptana<br />
</pre><ul><li> Run the script</li></ul>Alternatively, you may add the export statement to .bashrc or.bash_profile in your home directory and create an icon on your desktoppointing to the Aptana Studio executable. To set MOZILLA_FIVE_HOME forall users systemwide, add it to /etc/profile (on most systems).<br />
<span><span><br />
</span></span><br />
			 ]]> 
		</description>
		<category>우당탱 Ubuntu</category>

		<comments>http://beizix.egloos.com/2366401#comments</comments>
		<pubDate>Mon, 06 Jul 2009 17:26:54 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Ubuntu - Ruby on Rails 설치하기 ]]> </title>
		<link>http://beizix.egloos.com/2365413</link>
		<guid>http://beizix.egloos.com/2365413</guid>
		<description>
			<![CDATA[ 
  <font style="font-family: Gulim,Sans-serif;" class="Apple-style-span" face="Gulim, sans-serif"><b><div><span class="Apple-style-span" style="font-weight: normal;">// 루비 언어 설치단계</span><br />
</div>$</b> sudo apt-get install ruby irb <span class="copyAngel_elixir_LinkUp" original="http://elixir7.kr/29" entryid="29"><a class="copyAngel_elixir_LinkUp_remote" style="display: inline;" href="http://elixir7.kr/29?t=c&amp;i=0">rdoc</a><span class="copyAngel_elixir_LinkUp_local" style="display: none;">rdoc</span></span> &nbsp; &nbsp;</font><div style="font-family: Gulim,Sans-serif;"><font class="Apple-style-span"><br />
</font></div><div style="font-family: Gulim,Sans-serif;"><font class="Apple-style-span">// Gem 설치단계</font></div><div style="font-family: Gulim,Sans-serif;"><font class="Apple-style-span"><b>$</b>&nbsp;sudo apt-get install rubygems</font></div><div style="font-family: Gulim,Sans-serif;"><font class="Apple-style-span"><b><br />
// gem 업데이트를 위해 기존에는 <br />
$</b>&nbsp;gem update --system<br />
를 실행했지만, 지금은 다음과 같은 메세지가 보인다.<br />
<br />
&nbsp;&nbsp;&nbsp;gem update --system is disabled on Debian. RubyGems can be updatedusing the official Debian repositories by aptitude or apt-get.<br />
<br />
그래서 아래 명령어 둘중의 하나를 실행한다.<br />
</font><font class="Apple-style-span"><b>$</b> </font><font class="Apple-style-span">sudo gem install rubygems-update<br />
or<br />
</font><font class="Apple-style-span"><b>$</b> </font><font class="Apple-style-span">sudo update_rubygems<br />
<br />
그 다음에는 </font><font class="Apple-style-span">rubygems-update 로 가서</font><br />
<font class="Apple-style-span">$ cd /var/lib/gems/1.8/gems/rubygems-update-*<br />
$ sudo ruby setup.rb<br />
를 실행하면 업데이트를 받을 수 있다. <br />
<br />
</font></div><div style="font-family: Gulim,Sans-serif;"><font class="Apple-style-span"><br />
</font></div><div style="font-family: Gulim,Sans-serif;"><font class="Apple-style-span">// 루비 온 레일스 설치단계</font></div><div style="font-family: Gulim,Sans-serif;"><font class="Apple-style-span"><b>$</b>&nbsp;gem install rails<br />
<br />
// sqlite3 설치<br />
예전에는 <br />
$ gem install sqlite3-ruby <br />
를 실행하면, 설치가 가능했으나, 현재는</font><br />
Building native extensions.  <br />
This could take a while...ERROR:  Error installing sqlite3-ruby:<br />
<pre>ERROR: Failed to build gem native extension.<br />
</pre>라는 에러메세지를 뱉는다. 그래서 다음과 같이 설치한다.<br />
<font class="Apple-style-span"><br />
</font>$ sudo apt-get install sqlite3 libsqlite3-dev<br />
<br />
</div><font class="Apple-style-span"><br />
// gem 환경설정 <br />
자신 계정의 .bashrc 파일을 연다. <br />
vi /&lt;자기계정&gt;/.bashrc<br />
<br />
파일 맨끝에 다음 추가 <br />
PATH=$PATH:/var/lib/gems/1.8/bin/<br />
export PATH<br />
<br />
터미널 창을 닫고 다시 연다. <br />
</font><font class="Apple-style-span"><b>$ </b></font><font class="Apple-style-span">rails -v&nbsp; <br />
<br />
버전정보가 나왔다면, 환경변수가 올바르게 잡힌것임.</font>			 ]]> 
		</description>
		<category>우당탱 Ubuntu</category>

		<comments>http://beizix.egloos.com/2365413#comments</comments>
		<pubDate>Sun, 05 Jul 2009 16:37:55 GMT</pubDate>
		<dc:creator>beizix</dc:creator>
	</item>
</channel>
</rss>
