しかし Redmine はそもそも初めてで、調べてみるとなかなか悩ましいところもある。 ruby-1.9, Rails 3 が NG とのこと。。。 そんなわけで ruby-1.8.7-p334 を入れて、
gem install rails -v=2.3.11 gem install rack -v=1.1.1
とした。
Redmine の場合 subversion や git などいくつか選べる。git はほとんど使ったことがないので悩ましかったが subversion をビルドするのが厭という理由で git を選択。で、 git をパッケージで入れた。subversion はなぜかパッケージインストールしなかった。ちょっと git を使ってみたかったということか。
しかし Redmine のドキュメントをみると bare repos と local repos の両方必要と書いてある。bare ? local ? git なんぞや web で調べるもなかなかぴんとこない。そんななかようやくわかりやすいページを見つけた。
せっかちな人のための git 入門
git には本当のリポジトリと仮のリポジトリがあってコミットが 2 段構えになっているようだ。わかり易くかつ非常に短くまとまっていてまさに「せっかちな人」むけだと思う。
redmine-1.2.0 を自分のホームで展開し、 ディレクトリ名を Redmine とした。DB は PostgreSQL を入れたばかりなのでそれを使うことに。
createdb redmine
それから、 ruby 1.9 ではすでに入れたのだけど、以下をもう一度 1.8 にパスを切ってインスト。
gem install pg -- --with-pg-dir=/usr/local/pgsql gem install dbi gem install dbd-pg
Redmine/config/database.yml を下記のように書いて
production: adapter: postgresql database: redmine host: localhost username: shingo password: encoding: utf8
ruby-1.8.7 へパスをきって
rake generate_session_store
とやろうとしかけて、which rake すると 1.9 の rake が手を上げている。1.8 は rake は別途いれるんだった。rubygems-1.8.5 を取ってきて
cd rubygems-1.8.5/ ruby setup.rb gem install rake
気を取り直して
shingo@catchy:~/Redmine$ rake generate_session_store Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
いわれるままに羊のように
gem install -v=0.4.2 i18n
再度、、
shingo@catchy:~/Redmine$ rake generate_session_store NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /home/shingo/Redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:21. NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#refresh! called from /home/shingo/Redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:34. NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#load_gems_in called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:320. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127. NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#initialize called from /home/shingo/Redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead. at /home/shingo/Redmine/lib/tasks/email.rake:170
なんかdeprecated の山。一抹の不安を感じつつ、
shingo@catchy:~/Redmine$ RAILS_ENV=production rake db:migrate NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /home/shingo/Redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:21. NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#refresh! called from /home/shingo/Redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:34. NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#load_gems_in called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:320. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127. NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#initialize called from /home/shingo/Redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91. rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead. at /home/shingo/Redmine/lib/tasks/email.rake:170 rake aborted! undefined method `name' for "i18n":String Tasks: TOP => db:migrate => environment (See full trace by running task with --trace)
?? i18n 入れたばっかりなのに。。。 なんか変だな。変だな。。。 最初のほうで gem install rails とかやったけど、あの時はまだ1.8 の rubygems 入れていなかったから 1.9 のほうに作業していたはずだ。もう一度
gem install rails -v=2.3.11 gem install rack -v=1.1.1 gem install pg -- --with-pg-dir=/usr/local/pgsql gem install dbi gem install dbd-pg
それでもアボートする。はー trac にしておけばよかった。orz → Redmine 導入作業 2 へ続く
0 件のコメント:
コメントを投稿