« Windows7にapache SSL をいれる | トップページ | Review Board 1.5 をWindowsにインストール (LightTPDでは動かずApache+mod_pythonで動いた) »

2010年9月19日 (日)

【解決】Retrospectiva 2.0.0 をWindowsにインストール

ようやくWindowsにRetrospectivaがインストールできたのでめも

Restospectiva本家

wikiのhttp://retrospectiva.org/wiki/Retrospectiva

がドキュメントっぽい

blogのhttp://retrospectiva.org/blog

はWhat's newだな

wikiの方に

Installation On Windows – not recommended for production

をまずは実施。

not recommended for production
は気にしない。

まずはrubyいれると
http://rubyinstaller.org/downloads/
からrubyinstaller-1.8.7-p302.exeげっと

インストール時にチェックボックス2つチェック(PATHにいれて、rbの関連づけ)

インストールチェック
C:\Users\jimmy>ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

RubyGemは↑ので入った
C:\Users\jimmy>gem --version
1.3.7

Railsは、なし
C:\Users\jimmy>gem list

*** LOCAL GEMS ***

なので、Railsインストール

C:\Users\jimmy>gem install rails
Successfully installed activesupport-3.0.0
Successfully installed builder-2.1.2
Successfully installed i18n-0.4.1
Successfully installed activemodel-3.0.0
Successfully installed rack-1.2.1
Successfully installed rack-test-0.5.4
Successfully installed rack-mount-0.6.13
Successfully installed tzinfo-0.3.23
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.6
Successfully installed actionpack-3.0.0
Successfully installed arel-1.0.1
Successfully installed activerecord-3.0.0
Successfully installed activeresource-3.0.0
Successfully installed mime-types-1.16
Successfully installed polyglot-0.3.1
Successfully installed treetop-1.4.8
Successfully installed mail-2.2.6.1
Successfully installed actionmailer-3.0.0
Successfully installed rake-0.8.7
Successfully installed thor-0.14.1
Successfully installed railties-3.0.0
Successfully installed bundler-1.0.0
Successfully installed rails-3.0.0
24 gems installed
Installing ri documentation for activesupport-3.0.0...
Installing ri documentation for builder-2.1.2...
ERROR:  While generating documentation for builder-2.1.2
... MESSAGE:   Unhandled special: Special: type=17, text="<!-- HI -->"
... RDOC args: --ri --op C:/Ruby187/lib/ruby/gems/1.8/doc/builder-2.1.2/ri --tit
le Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES
Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc
doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation
(continuing with the rest of the installation)
Installing ri documentation for i18n-0.4.1...
Installing ri documentation for activemodel-3.0.0...
Installing ri documentation for rack-1.2.1...
Installing ri documentation for rack-test-0.5.4...
Installing ri documentation for rack-mount-0.6.13...
Installing ri documentation for tzinfo-0.3.23...
Installing ri documentation for abstract-1.0.0...
Installing ri documentation for erubis-2.6.6...
Installing ri documentation for actionpack-3.0.0...
Installing ri documentation for arel-1.0.1...
Installing ri documentation for activerecord-3.0.0...
ERROR:  While executing gem ... (Errno::EINVAL)
    Invalid argument - ./</cdesc-<.yaml

C:\Users\jimmy>gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0)
actionpack (3.0.0)
activemodel (3.0.0)
activerecord (3.0.0)
activeresource (3.0.0)
activesupport (3.0.0)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.0)
erubis (2.6.6)
i18n (0.4.1)
mail (2.2.6.1)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.4)
rails (3.0.0)
railties (3.0.0)
rake (0.8.7)
thor (0.14.1)
treetop (1.4.8)
tzinfo (0.3.23)

C:\Users\jimmy>

なんかドキュメントのインストールでエラー&Rails3.0がはいってもうた
uninstallして2.3.8いれなおそ

gem uninstallしまくって全部削除gem listでまっさらにして

C:\Users\jimmy>gem install rails --version 2.3.8
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
8 gems installed
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.8...
Installing ri documentation for activerecord-2.3.8...
Installing ri documentation for rack-1.1.0...
Installing ri documentation for actionpack-2.3.8...
Installing ri documentation for actionmailer-2.3.8...
Installing ri documentation for activeresource-2.3.8...
Installing ri documentation for rails-2.3.8...
Installing RDoc documentation for rake-0.8.7...
Installing RDoc documentation for activesupport-2.3.8...
Installing RDoc documentation for activerecord-2.3.8...
Installing RDoc documentation for rack-1.1.0...
Installing RDoc documentation for actionpack-2.3.8...
Installing RDoc documentation for actionmailer-2.3.8...
Installing RDoc documentation for activeresource-2.3.8...
Installing RDoc documentation for rails-2.3.8...

2.3.8か確認

C:\Users\jimmy>gem list

*** LOCAL GEMS ***

actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)

つぎにMySQLはやめてSQLiteにしまして

C:\Users\jimmy>gem install sqlite3-ruby

=============================================================================

  You've installed the binary version of sqlite3-ruby.
  It was built using SQLite3 version 3.6.23.1.
  It's recommended to use the exact same version to avoid potential issues.

  At the time of building this gem, the necessary DLL files where available
  in the following download:

  http://www.sqlite.org/sqlitedll-3_6_23_1.zip

  You can put the sqlite3.dll available in this package in your Ruby bin
  directory, for example C:\Ruby\bin

=============================================================================

Successfully installed sqlite3-ruby-1.3.1-x86-mingw32
1 gem installed
Installing ri documentation for sqlite3-ruby-1.3.1-x86-mingw32...

Enclosing class/module 'mSqlite3' for class Statement not known

No definition for libversion
Installing RDoc documentation for sqlite3-ruby-1.3.1-x86-mingw32...

Enclosing class/module 'mSqlite3' for class Statement not known

No definition for libversion

確認

C:\Users\jimmy>gem list

*** LOCAL GEMS ***

actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
sqlite3-ruby (1.3.1 x86-mingw32)

同じバージョンがよいとかいってるので言われたとおり
http://www.sqlite.org/sqlitedll-3_6_23_1.zip
をげっと&解凍してsqlite3.dllをc:\Ruby187\binに移動

続きはこっちということで
http://retrospectiva.org/wiki/Installation

http://retrospectiva.org/tickets/357#ch1179

まずRetrospectiva本体げっと
retrospectiva-2.0.tar.gz

Windowsではtar.gzはnoahで解凍

このnoahさん、残念ながら開発休止中で、Windows7 64bitでは管理者権限必要。認証が必要なプロキシNG。で、ソースが公開されていて、ソースコードが足りないっぽいので、たぶんだれもコンパイルできん状態で、もったいないなぁと。

とおもったらZIP版もあった
http://github.com/dim/retrospectiva/downloads

で下記に解凍
C:\retrospectiva-2.0

SQLite用設定ファイルテンプレートの
C:\retrospectiva-2.0\config\templates\database.sqlite3.yml

C:\retrospectiva-2.0\config\database.yml
のようにdatabase.ymlとして名前変えてコピー

で、おもむろにサーバ起動

c:\retrospectiva-2.0>ruby script/server -e production -p3000
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warn
ing: Gem::Dependency#version_requirements is deprecated and will be removed on o
r after August 2010.  Use #requirement
The following gems have native components that need to be built
  RedCloth  >= 4.1.9

You're running:
  ruby 1.8.7.302 at C:/Ruby187/bin/ruby.exe
  rubygems 1.3.7 at C:/Users/jimmy/.gem/ruby/1.8, C:/Ruby187/lib/ruby/gems/1.8

Run `rake gems:build` to build the unbuilt gems.

The following gems have native components that need to be built
  RedCloth  >= 4.1.9
というわけでRedClothの4.1.9のWindowsネイティブがいるということで、かなり試行錯誤の結果(メモなし)

C:\Users\jimmy>gem install RedCloth -v 4.1.9 --platform=x86-mswin32-60
Successfully installed RedCloth-4.1.9-x86-mswin32-60
1 gem installed
Installing ri documentation for RedCloth-4.1.9-x86-mswin32-60...
Installing RDoc documentation for RedCloth-4.1.9-x86-mswin32-60...

Retrospectivaに一緒についてきたWindowsネイティブでない
C:\retrospectiva-2.0\vendor\gems\RedCloth-4.2.2
は削除。

再度サーバ起動してhttp://localhost:3000/

c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:417:in `catch_schema_changes'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:320:in `select'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/base.rb:661:in `find_by_sql'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/base.rb:1548:in `find_every'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/base.rb:1505:in `find_initial'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/base.rb:613:in `find'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/named_scope.rb:181:in `send'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/named_scope.rb:181:in `method_missing'
c:/retrospectiva-2.0/vendor/rails/activerecord/lib/active_record/base.rb:2143:in `with_scope'
c:1:in `__send__'
c:1:in `with_scope'
c:1:in `__send__'
c:1:in `with_scope'
c:1:in `__send__'
c:1:in `with_scope'
c:/retrospectiva-2.0/app/models/project.rb:52:in `central'
c:/retrospectiva-2.0/lib/routing_filter/central_project.rb:5:in `around_recognize'

データベース作ってない
sqlitestudio

メインメニューのDatabasesからAdd databaseを選択
Database name:をretrospectiva
Database file:を
C:\retrospectiva-2.0\db\production.sqlite3
にして上書き
production.sqlite3のサイズが0KBから2KBにかわって再度、サーバ起動したら同じエラー

うーん
rake gems:install

rake RAILS_ENV=production db:retro:load
やってない

c:\retrospectiva-2.0>rake gems:install
(in c:/retrospectiva-2.0)
rake aborted!
development database is not configured

(See full trace by running task with --trace)

c:\retrospectiva-2.0>rake RAILS_ENV=production db:retro:load
(in c:/retrospectiva-2.0)
Task db:retro:load is deprecated and was disabled; please use db:setup instead.

おこられたので次のコマンドでやりなおし
rake RAILS_ENV=production gems:install
rake RAILS_ENV=production db:setup

c:\retrospectiva-2.0>rake RAILS_ENV=production gems:install
(in c:/retrospectiva-2.0)

c:\retrospectiva-2.0>rake RAILS_ENV=production db:setup
(in c:/retrospectiva-2.0)
db/production.sqlite3 already exists
指定されたパスが見つかりません。
-- create_table("attachments", {:force=>true})
   -> 0.0605s
-- add_index("attachments", ["attachable_type", "attachable_id"], {:name=>"i_att
_on_type_and_id"})
   -> 0.0820s
-- add_index("attachments", ["project_id"], {:name=>"i_attachments_prj_id"})
   -> 0.0742s
-- add_index("attachments", ["type"], {:name=>"i_attachments_type"})
   -> 0.0723s
-- create_table("changes", {:force=>true})
   -> 0.0918s
-- add_index("changes", ["changeset_id"], {:name=>"i_changes_on_changeset"})
   -> 0.0723s
-- add_index("changes", ["from_path"], {:name=>"i_changes_on_from_path"})
   -> 0.0742s
-- add_index("changes", ["path"], {:name=>"i_changes_on_path"})
   -> 0.0723s
-- add_index("changes", ["repository_id"], {:name=>"i_changes_on_repository_id"}
)
   -> 0.0742s
-- create_table("changesets", {:force=>true})
   -> 0.4902s
-- add_index("changesets", ["created_at"], {:name=>"i_cs_on_created_at"})
   -> 0.0898s
-- add_index("changesets", ["repository_id"], {:name=>"i_cs_on_repository_id"})
   -> 0.0918s
-- add_index("changesets", ["user_id"], {:name=>"i_cs_on_user_id"})
   -> 0.1074s
-- create_table("changesets_projects", {:force=>true, :id=>false})
   -> 0.1094s
-- add_index("changesets_projects", ["changeset_id"], {:name=>"i_cp_on_changeset
"})
   -> 0.1133s
-- add_index("changesets_projects", ["project_id"], {:name=>"i_cp_on_project"})
   -> 0.1152s
-- create_table("configuration", {:force=>true})
   -> 0.1055s
-- create_table("groups", {:force=>true})
   -> 0.1250s
-- create_table("groups_projects", {:force=>true, :id=>false})
   -> 0.0918s
-- add_index("groups_projects", ["group_id", "project_id"], {:name=>"i_gp_on_gro
up_and_project"})
   -> 0.0996s
-- create_table("groups_users", {:force=>true, :id=>false})
   -> 0.0898s
-- add_index("groups_users", ["group_id", "user_id"], {:name=>"i_gu_on_group_and
_user"})
   -> 0.0898s
-- create_table("milestones", {:force=>true})
   -> 0.1250s
-- add_index("milestones", ["project_id"], {:name=>"i_mst_on_project_id"})
   -> 0.1016s
-- add_index("milestones", ["rank"], {:name=>"i_mst_on_rank"})
   -> 0.0996s
-- add_index("milestones", ["updated_at"], {:name=>"i_mst_on_updated_at"})
   -> 0.0996s
-- create_table("priorities", {:force=>true})
   -> 0.3242s
-- add_index("priorities", ["rank"], {:name=>"i_prt_on_rank"})
   -> 0.1172s
-- create_table("projects", {:force=>true})
   -> 0.1289s
-- add_index("projects", ["central"], {:name=>"i_projects_on_central"})
   -> 0.0918s
-- add_index("projects", ["repository_id"], {:name=>"i_projects_on_repository_id
"})
   -> 0.0879s
-- add_index("projects", ["short_name"], {:name=>"i_projects_on_short_name"})
   -> 0.0898s
-- create_table("queued_mails", {:force=>true})
   -> 0.1094s
-- create_table("repositories", {:force=>true})
   -> 0.1035s
-- add_index("repositories", ["type"], {:name=>"i_repositories_on_type"})
   -> 0.0840s
-- create_table("secure_tokens", {:force=>true})
   -> 0.0801s
-- add_index("secure_tokens", ["type"], {:name=>"i_stokens_type"})
   -> 0.0762s
-- add_index("secure_tokens", ["user_id"], {:name=>"i_stokens_user_id"})
   -> 0.1426s
-- add_index("secure_tokens", ["value"], {:name=>"i_stokens_value"})
   -> 0.0996s
-- create_table("statuses", {:force=>true})
   -> 0.1250s
-- add_index("statuses", ["rank"], {:name=>"i_status_on_rank"})
   -> 0.1211s
-- create_table("taggings", {:force=>true})
   -> 0.0977s
-- add_index("taggings", ["tag_id"], {:name=>"i_taggings_on_tag_id"})
   -> 0.0996s
-- add_index("taggings", ["taggable_id", "taggable_type", "context"], {:name=>"i
_taggings_on_references"})
   -> 0.1074s
-- create_table("tags", {:force=>true})
   -> 0.0977s
-- add_index("tags", ["name"], {:name=>"i_tags_on_name"})
   -> 0.0898s
-- create_table("tasks", {:force=>true})
   -> 0.0898s
-- add_index("tasks", ["name"], {:name=>"i_tasks_name"})
   -> 0.0918s
-- create_table("ticket_changes", {:force=>true})
   -> 0.0938s
-- add_index("ticket_changes", ["created_at"], {:name=>"i_tchanges_on_created_at
"})
   -> 0.0977s
-- add_index("ticket_changes", ["ticket_id"], {:name=>"i_tchanges_on_ticket_id"}
)
   -> 0.0781s
-- create_table("ticket_properties", {:force=>true})
   -> 0.0820s
-- add_index("ticket_properties", ["rank"], {:name=>"i_tprops_on_rank"})
   -> 0.1016s
-- add_index("ticket_properties", ["ticket_property_type_id"], {:name=>"i_t_prop
s_on_tptype_id"})
   -> 0.1113s
-- create_table("ticket_properties_tickets", {:force=>true, :id=>false})
   -> 0.1289s
-- add_index("ticket_properties_tickets", ["ticket_id", "ticket_property_id"], {
:unique=>true, :name=>"ui_tprops_on_tickets"})
   -> 0.0898s
-- create_table("ticket_property_types", {:force=>true})
   -> 0.0977s
-- add_index("ticket_property_types", ["project_id"], {:name=>"i_tptypes_on_proj
ect_id"})
   -> 0.1074s
-- add_index("ticket_property_types", ["rank"], {:name=>"i_prop_types_on_rank"})

   -> 0.1934s
-- create_table("ticket_reports", {:force=>true})
   -> 0.0977s
-- add_index("ticket_reports", ["project_id"], {:name=>"i_treports_on_project_id
"})
   -> 0.0918s
-- create_table("ticket_subscribers", {:force=>true, :id=>false})
   -> 0.1523s
-- add_index("ticket_subscribers", ["ticket_id"], {:name=>"i_tsubscribers_on_tic
ket_id"})
   -> 0.1074s
-- add_index("ticket_subscribers", ["user_id"], {:name=>"i_tsubscribers_on_user_
id"})
   -> 0.0898s
-- create_table("tickets", {:force=>true})
   -> 0.0859s
-- add_index("tickets", ["assigned_user_id"], {:name=>"i_tickets_on_auser_id"})
   -> 0.0762s
-- add_index("tickets", ["milestone_id"], {:name=>"i_tickets_on_milestone_id"})
   -> 0.0996s
-- add_index("tickets", ["priority_id"], {:name=>"i_tickets_on_priority_id"})
   -> 0.0840s
-- add_index("tickets", ["project_id"], {:name=>"i_tickets_on_project_id"})
   -> 0.0781s
-- add_index("tickets", ["status_id"], {:name=>"i_tickets_on_status_id"})
   -> 0.0820s
-- add_index("tickets", ["user_id"], {:name=>"i_tickets_on_user_id"})
   -> 0.0723s
-- create_table("users", {:force=>true})
   -> 0.1016s
-- add_index("users", ["private_key"], {:name=>"i_users_on_private_key"})
   -> 0.0996s
-- add_index("users", ["scm_name"], {:name=>"i_users_on_scm_name"})
   -> 0.0781s
-- add_index("users", ["username"], {:name=>"i_users_on_login"})
   -> 0.0938s
-- initialize_schema_migrations_table()
   -> 0.1816s
-- assume_migrated_upto_version(20090504172000)
   -> 8.8652s
Creating some default priorities
Creating some default statuses
Creating default group
Creating default public user
Creating default admin user
Creating default tasks

c:\retrospectiva-2.0>

このコマンド打てばデータベースつくってくれていそうなので、sqlitestudioでデータベース作る必要なかったかも

サーバ起動して

c:\retrospectiva-2.0>ruby script/server -e production -p3000
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warn
ing: Gem::Dependency#version_requirements is deprecated and will be removed on o
r after August 2010.  Use #requirement
指定されたパスが見つかりません。
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-09-19 02:32:54] INFO  WEBrick 1.3.1
[2010-09-19 02:32:54] INFO  ruby 1.8.7 (2010-08-16) [i386-mingw32]
[2010-09-19 02:32:54] INFO  WEBrick::HTTPServer#start: pid=4840 port=3000

でけた

Ws000004

 

rails2.3.5つかっているから
config/environment.rb
の6行目をコメントアウト
#RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

サーバ起動で2.3.5が起動してしまいました

environment.rbをよんで
# Specifies gem version of Rails to use when vendor/rails is not present
の通りに、vendor/railsを削除して
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
の行を2.3.8に編集してコメントアウトやめて有効にしてサーバ起動

c:\retrospectiva-2.0>ruby script/server -e production -p3000
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
指定されたパスが見つかりません。
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-09-19 02:47:50] INFO  WEBrick 1.3.1
[2010-09-19 02:47:50] INFO  ruby 1.8.7 (2010-08-16) [i386-mingw32]
[2010-09-19 02:47:50] INFO  WEBrick::HTTPServer#start: pid=5612 port=3000

2.3.8で動いた
ブラウザでばっちりアクセスできる

とりあえず「指定されたパスが見つかりません。」は無視

To enter the administration environment login as admin and use password as password.

とあるのでadmin/passwordでログイン

Ws000005_2

 

めでたい。ねよう。

|

« Windows7にapache SSL をいれる | トップページ | Review Board 1.5 をWindowsにインストール (LightTPDでは動かずApache+mod_pythonで動いた) »

Ruby」カテゴリの記事

Windows」カテゴリの記事

パソコン・インターネット」カテゴリの記事

コメント

コメントを書く



(ウェブ上には掲載しません)




トラックバック

この記事のトラックバックURL:
http://app.f.cocolog-nifty.com/t/trackback/1009744/36810817

この記事へのトラックバック一覧です: 【解決】Retrospectiva 2.0.0 をWindowsにインストール:

« Windows7にapache SSL をいれる | トップページ | Review Board 1.5 をWindowsにインストール (LightTPDでは動かずApache+mod_pythonで動いた) »