<?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; Ruby</title>
	<atom:link href="http://ore.saizensen.net/archives/category/lang/ruby/feed" rel="self" type="application/rss+xml" />
	<link>http://ore.saizensen.net</link>
	<description>イェ〜〜ィ。見てる〜〜〜？？</description>
	<lastBuildDate>Fri, 18 Dec 2009 02:55:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[Ubuntu]Ubuntu8.10でRailsをアップデートしたよ。[Rails]</title>
		<link>http://ore.saizensen.net/archives/187</link>
		<comments>http://ore.saizensen.net/archives/187#comments</comments>
		<pubDate>Fri, 12 Dec 2008 02:51:05 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[Lang]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[インストールメモ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=187</guid>
		<description><![CDATA[				Rails2.1.0をインストールしていたけど、新しいRails2.2.2をインストールするよ。
				
				rubygemsのバージョンをアップデートする。
				
% sudo gem install [...]]]></description>
			<content:encoded><![CDATA[				<p><strong>Rails2.1.0</strong>をインストールしていたけど、新しい<strong>Rails2.2.2</strong>をインストールするよ。</p>
				<ol>
				<li><strong>rubygems</strong>のバージョンをアップデートする。
				<pre>
% sudo gem install rubygems-update
% sudo gem update rubygems-update
</pre>
				</li>
				<li><strong>Rails</strong>をインストールする。
				<pre>% sudo gem update rails</pre>
<p>MySQLのドライバーがねーよ！とか言われた人はMysqlのドライバーもインストールする。↓</p>
<pre>
%sudo apt-get install libmysqlclient15-dev
%sudo gem install mysql
</pre>
				<p>他にもインストールしたいのあれば参考に→<a href="http://ore.saizensen.net/archives/148">[Ubuntu]Ubuntu8.10へRailsをインストールしたよ。[Rails]</a>
				</li>
				<li>既存のアプリケーションが利用している<strong>Rails</strong>のバージョンを上げる。
				<pre>
% cd /var/www/rails/app  ## Railsアプリケーションまで移動する。移動先は自分の環境に合わせて
% vi config/environment.rb
RAILS_GEM_VERSION = '2.1.0'
↓ ## 使いたいRailsのバージョンへ修正。
RAILS_GEM_VERSION = '2.2.2'
% rake rails:update
</pre>
				</li>
				</ol>
				<p>以上で<strong>Rails</strong>のバージョンが上がったよと。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/187/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Ubuntu]Ubuntu8.10へRailsをインストールしたよ。[Rails]</title>
		<link>http://ore.saizensen.net/archives/148</link>
		<comments>http://ore.saizensen.net/archives/148#comments</comments>
		<pubDate>Fri, 21 Nov 2008 08:18:09 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[Lang]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[インストールメモ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=148</guid>
		<description><![CDATA[				
				rubyとかrailsとかImagemagickとかごった煮インストール。
				
% sudo apt-get install ruby ruby-dev irb rubygems libruby-extras libgit-ruby librmagick-ruby vim-ruby vim-rails imagemagick libmagick++9-dev sqlite libsqlite0-dev libsqlite3-dev sqlitebrowser libmysqlclient15-dev  postgresql-server-dev-8.3
% sudo apt-get install lighttpd libfcgi-dev
% sudo gem install rails
% sudo gem install rmagick
% sudo gem install sqlite3-ruby
% sudo gem install mysql
% sudo gem install postgres
% sudo gem install postgres-pr
% sudo gem install vim-ruby
% [...]]]></description>
			<content:encoded><![CDATA[				<ol>
				<li>rubyとかrailsとかImagemagickとかごった煮インストール。
				<pre>
% sudo apt-get install ruby ruby-dev irb rubygems libruby-extras libgit-ruby librmagick-ruby vim-ruby vim-rails imagemagick libmagick++9-dev sqlite libsqlite0-dev libsqlite3-dev sqlitebrowser libmysqlclient15-dev  postgresql-server-dev-8.3
% sudo apt-get install lighttpd libfcgi-dev
% sudo gem install rails
% sudo gem install rmagick
% sudo gem install sqlite3-ruby
% sudo gem install mysql
% sudo gem install postgres
% sudo gem install postgres-pr
% sudo gem install vim-ruby
% sudo gem install mongrel
% sudo gem install mongrel_cluster
% sudo gem install fcgi
% sudo gem install net-ssh
% sudo gem install net-sftp
% sudo gem install Selenium
% sudo gem install jpmobile
% sudo gem install ruby-debug
% sudo gem install refe
% sudo gem install xml-simple
</pre>
				</li>
				<li>次に<a href="http://i.loveruby.net/ja/prog/refe.html">Refe</a>をインストールする。
				<ul>
				<li>インストール。
				<pre>
% wget http://i.loveruby.net/archive/refe/refe-0.8.0-withdocsrc.tar.gz
% tar zxvf refe-0.8.0-withdocsrc.tar.gz
% cd refe-0.8.0
% ruby setup.rb config
% ruby setup.rb setup
% sudo ruby setup.rb install
</pre>
				</li>
				<li>環境変数を設定する。
				<pre>
$ vi .zshrc
# Refe
REFE_DATA_DIR=/usr/share/refe
export REFE_DATA_DIR
</pre>
				</li>
				</ul>
				</li>
				</ol>
				<p><strong>※</strong>　% sudo gem install xml-simple をインストールのは、Ubuntu8.10で ruby script/generate　とかすると以下のwarningを吐く為。</p>
				<pre>
/usr/lib/ruby/1.8/xmlsimple.rb:275: warning: already initialized constant KNOWN_OPTIONS
/usr/lib/ruby/1.8/xmlsimple.rb:280: warning: already initialized constant DEF_KEY_ATTRIBUTES
/usr/lib/ruby/1.8/xmlsimple.rb:281: warning: already initialized constant DEF_ROOT_NAME
/usr/lib/ruby/1.8/xmlsimple.rb:282: warning: already initialized constant DEF_CONTENT_KEY
/usr/lib/ruby/1.8/xmlsimple.rb:283: warning: already initialized constant DEF_XML_DECLARATION
/usr/lib/ruby/1.8/xmlsimple.rb:284: warning: already initialized constant DEF_ANONYMOUS_TAG
/usr/lib/ruby/1.8/xmlsimple.rb:285: warning: already initialized constant DEF_FORCE_ARRAY
/usr/lib/ruby/1.8/xmlsimple.rb:286: warning: already initialized constant DEF_INDENTATION
/usr/lib/ruby/1.8/xmlsimple.rb:287: warning: already initialized constant DEF_KEY_TO_SYMBOL
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/148/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>rubygems &#8211; mysqlアダプタがインストール出来ない</title>
		<link>http://ore.saizensen.net/archives/20</link>
		<comments>http://ore.saizensen.net/archives/20#comments</comments>
		<pubDate>Tue, 29 Jan 2008 14:40:46 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[Lang]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/archives/20</guid>
		<description><![CDATA[				mac OSX 10.4 にgemでmysql2.7のネイティブアダプタがインストール出来ない場合。
				sudo gem install mysql &#8212; &#8211;with-mysql-dir=/usr/local/mysql
				Select which gem to install for your platform (i686-darwin8.11.1)
				1. mysql 2.7.3 (mswin32)
				2. mysql 2.7.1 (mswin32)
				3. mysql 2.7 (ruby)
				4. mysql 2.6 (ruby)
				5. Skip this gem
				6. Cancel installation
				&#62; Building native extensions.  This could take a while&#8230;
				ERROR:  While executing gem &#8230; (Gem::Installer::ExtensionBuildError)
				ERROR: Failed to build gem native extension.
				ruby [...]]]></description>
			<content:encoded><![CDATA[				<p>mac OSX 10.4 にgemでmysql2.7のネイティブアダプタがインストール出来ない場合。</p>
				<p>sudo gem install mysql &#8212; &#8211;with-mysql-dir=/usr/local/mysql</p>
				<p>Select which gem to install for your platform (i686-darwin8.11.1)<br />
				1. mysql 2.7.3 (mswin32)<br />
				2. mysql 2.7.1 (mswin32)<br />
				3. mysql 2.7 (ruby)<br />
				4. mysql 2.6 (ruby)<br />
				5. Skip this gem<br />
				6. Cancel installation<br />
				&gt; Building native extensions.  This could take a while&#8230;<br />
				ERROR:  While executing gem &#8230; (Gem::Installer::ExtensionBuildError)<br />
				ERROR: Failed to build gem native extension.</p>
				<p>ruby extconf.rb install mysql &#8212; &#8211;with-mysql-dir=/usr/local/mysql<br />
				checking for mysql_query() in -lmysqlclient&#8230; yes<br />
				checking for mysql_ssl_set()&#8230; yes<br />
				checking for mysql.h&#8230; yes<br />
				creating Makefile</p>
				<p>make<br />
				gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.11.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H -I/usr/local/mysql/include -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -c mysql.c<br />
				mysql.c: In function ‘query’:<br />
				mysql.c:635: error: invalid storage class for function ‘res_free’<br />
				mysql.c:637: error: ‘res_free’ undeclared (first use in this function)<br />
				mysql.c:637: error: (Each undeclared identifier is reported only once<br />
				mysql.c:637: error: for each function it appears in.)<br />
				mysql.c: In function ‘Init_mysql’:<br />
				mysql.c:1299: error: ‘ulong’ undeclared (first use in this function)<br />
				mysql.c:1299: error: parse error before numeric constant<br />
				mysql.c:1302: error: parse error before numeric constant<br />
				make: *** [mysql.o] Error 1</p>
				<p>Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.<br />
				Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out</p>
				<p>と、エラーを吐く。<br />
				以下、解決法↓</p>
				<p>sudo vim /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/mysql.c.in.<br />
				ファイル先頭に<br />
				#define ulong unsigned long<br />
				と記述。</p>
				<p>cd /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7<br />
				sudo ruby extconf.rb &#8211;with-mysql-config=/usr/local/mysql/bin/mysql_config<br />
				sudo make<br />
				sudo make install</p>
				<p>以上。メモ。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/20/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
