開発環境 All-In-One

インストール (Mac OS X)

1. Building Ruby, Rails, LightTPD, and MySQL on Tiger の手順でインストール。各ソフトウェアの最新バージョンを確認しつつ行う。

2007/7/7現在、以下のソフトのバージョンが変わっている。
  readline (5.1 => 5.2)
  Ruby (1.8.4 => 1.8.6)
  RubyGems (0.9.0 => 0.9.4)
  ruby-fcgi (0.8.6 => 0.8.7)
  PCRE (6.6 => 6.7)

(1) readline

$ curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
$ tar xzvf readline-5.2.tar.gz
$ cd readline-5.2
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ..

(2) Ruby

$ curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
$ tar xzvf ruby-1.8.6.tar.gz 
$ cd ruby-1.8.6
$ ./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local
$ make
$ sudo make install
$ sudo make install-doc
$ cd ..

(3) RubyGems?

$ curl -O http://rubyforge-files.ruby-forum.com/rubygems/rubygems-0.9.4.tgz
$ tar xzvf rubygems-0.9.4.tgz
$ cd rubygems-0.9.4
$ sudo /usr/local/bin/ruby setup.rb
$ cd ..

(4) Ruby on Rails

$ sudo gem install rails --include-dependencies

(5) FastCGI

$ curl -O http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
$ tar xzvf fcgi-2.4.0.tar.gz
$ cd fcgi-2.4.0
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ..

(6) Ruby-FastCGI bindings

$ curl -O http://rubyforge.iasi.roedu.net/files/fcgi/ruby-fcgi-0.8.7.tar.gz
$ tar xzvf ruby-fcgi-0.8.7.tar.gz
$ cd ruby-fcgi-0.8.7
$ /usr/local/bin/ruby install.rb config --prefix=/usr/local
$ /usr/local/bin/ruby install.rb setup
$ sudo /usr/local/bin/ruby install.rb install
$ cd ..

この段階で動作確認をしておく。
作業用のフォルダを作成し、そこで下記コマンドを実行。

$ rails test
$ cd test
$ ruby script/server

http://localhost:3000 にアクセスし、「Welcome aboard」の画面が表示されるのを確認

2. 多言語対応にするため、GNU GetText、Ruby-GetText?-Packageをインストールする。

(1) GNU GetText のインストール

$ tar zxvf gettext-0.16.1.tar.gz 
$ cd gettext-0.16.1
$ ./configure 
$ make
$ sudo make install  

(2) Ruby-GetText?-Package のインストール

$ sudo gem install gettext

3. MySQL

(1) MySQLアダプタのインストール

$ sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql

(2) MySQLのライブラリのパス設定 "rake migrate" を実行して

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
  Referenced from: /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
  Reason: image not found
Trace/BPT trap

といったエラーが出る場合は下記を実行する。

$ cd /usr/local/mysql/lib
$ sudo mkdir mysql
$ cd mysql
$ sudo ln -s /usr/local/mysql/lib/lib* .

4. PostgreSQL を使う場合は以下の作業を行う

(1) Postgres(Ruby extension library) から ruby-postgres-0.7.1.tar.gz をダウンロードし、以下のコマンドでインストール

$ ruby extconf.rb --with-pgsql-include-dir=/usr/local/pgsql/include --with-pgsql-lib-dir=/usr/local/pgsql/lib
$ make
$ sudo make install

(2) postgres-ruby をインストール

$ sudo gem install postgres -- --with-pgsql-dir=/usr/local/pgsql

4. ついでにRails専用IDE RadRails もインストール
 ここを参考にインストール。

インストール (Windows)

プラグイン

プラグインのインストール方法

1. プラグインリポジトリの検索

$ ruby script/plugin discover

2. プラグインのインストール

$ ruby script/plugin install [プラグイン名]

3. プラグインの設定

4. config/environment.rb を変更した場合はサーバプロセス(WEBrick など)を再起動

※ 上記 1. でエラーになる場合は、以下のシェルスクリプトを実行してプラグインリポジトリを構築

#!/bin/sh

./script/plugin source http://svn.techno-weenie.net/projects/plugins/
./script/plugin source http://delynnberry.com/svn/code/rails/plugins/
./script/plugin source http://svn.recentrambles.com/plugins/
./script/plugin source http://opensvn.csie.org/rails_file_column/plugins/
./script/plugin source http://svn.protocool.com/rails/plugins/
./script/plugin source https://source.integrumtech.com/svn/public/plugins/
./script/plugin source http://tools.assembla.com/svn/breakout/breakout/vendor/plugins/
./script/plugin source http://svn.pragprog.com/Public/plugins/
./script/plugin source svn://rubyforge.org//var/svn/laszlo-plugin/rails/plugins/
./script/plugin source http://svn.inlet-media.de/svn/rails_extensions/plugins/
./script/plugin source http://svn.viney.net.nz/things/rails/plugins/
./script/plugin source http://svn.hasmanythrough.com/public/plugins/
./script/plugin source svn://caboo.se/plugins/
./script/plugin source http://shanesbrain.net/svn/rails/plugins/
./script/plugin source svn://errtheblog.com/svn/plugins/
./script/plugin source svn://svn.nkryptic.com/plugins/
./script/plugin source http://invisible.ch/svn/projects/plugins/
./script/plugin source http://hivelogic.com/plugins/
./script/plugin source https://secure.near-time.com/svn/plugins/
./script/plugin source http://mattmccray.com/svn/rails/plugins/
./script/plugin source http://svn.codefluency.com/rails/plugins/
./script/plugin source http://www.svn.recentrambles.com/plugins/
./script/plugin source http://tanjero.com/svn/plugins/
./script/plugin source http://filetofsole.org/svn/public/projects/rails/plugins/
./script/plugin source http://topfunky.net/svn/plugins/
./script/plugin source http://www.eric-stewart.com/svn/rails/plugins/
./script/plugin source http://joshpeek.com/svn/plugins/
./script/plugin source http://svn.aviditybytes.com/rails/plugins/
./script/plugin source http://beautifulpixel.textdriven.com/svn/plugins/
./script/plugin source http://mabs29.googlecode.com/svn/trunk/plugins/
./script/plugin source http://www.codyfauser.com/svn/projects/plugins/
./script/plugin source http://craz8.com/svn/trunk/plugins/
./script/plugin source http://sean.treadway.info/svn/plugins/
./script/plugin source http://svn.thebootstrapnation.com/public/plugins/
./script/plugin source http://www.mattmccray.com/svn/rails/plugins/
./script/plugin source svn://rubyforge.org//var/svn/validaterequest/plugins/
./script/plugin source http://xmlblog.stikipad.com/plugins/
./script/plugin source http://www.xml-blog.com/svn/plugins/
./script/plugin source http://svn.toolbocks.com/plugins/
./script/plugin source http://thar.be/svn/projects/plugins/
./script/plugin source http://code.teytek.com/rails/plugins/
./script/plugin source http://svn.teytek.com/rails/plugins/
./script/plugin source http://www.infused.org/svn/plugins/
./script/plugin source http://svn.mitchellhashimoto.com/plugins/
./script/plugin source http://svn.eastmedia.com/svn/bantay/plugins/
./script/plugin source http://svn.writertopia.com/svn/plugins/
./script/plugin source http://opensvn.csie.org/ezra/rails/plugins/
./script/plugin source http://svn.substance-it.co.uk/public/plugins/
./script/plugin source http://svn.rails-engines.org/plugins/
./script/plugin source http://activerbac.turingstudio.com/source/active_rbac/plugins/
./script/plugin source http://svn.openprofile.net/plugins/
./script/plugin source http://www.nickm.org/svn/repos/rails/plugins/
./script/plugin source http://cubesix.net/rails/plugins/
./script/plugin source http://svn.rtra.in/public/plugins/

開発環境

プラグイン一覧

プラグイン説明実用度(0-10)参考URL
Acts As Versionedモデルに格納された内容がバージョン管理され、旧バージョンへのロールバックなどが簡単にできるようになる。?
GlobalizeRailsを国際化対応にするプラグイン。言語ごとに文言を切り替えるだけでなく、日付や数値フォーマットの国際化をサポート。?
Acts As Searchable全文検索エンジンであるHyperEstraier?を使った検索機能を提供?
LoginEngine?ユーザ管理機能(ログイン機能)?LoginEngineを使ってみる
File column画像ファイルのアップロード/表示/リサイズなどをサポート?Ruby on Rails入門 第6回:プラグインでさらに生産性アップ
  • ActiveHeart?

携帯関係

リンク集


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-04-09 (日) 21:28:04 (2567d)