[前][次][番号順一覧][スレッド一覧]

rails:1058

From: okkez <okkez000@g...>
Date: Sun, 16 Apr 2006 23:38:28 +0900
Subject: [rails:1058] Windows上でRailsを動かしたい

こんばんは。
okkezです。

ここ二日ほど、表題の件に取り組んでいました。
もちろん、InstantRailsを使えば手っ取り早いのですが、なんとなくやってみました。
しかし、どうにもならなくなってしまいました。

環境
OS WindowsXP
ruby 1.8.4 (i386-mingw32) # mswin32版だとgemのインストールでこけた。
PostgreSQL 8.1.2 (win版)
PostgreSQL 8.1.0 (Debian sarge上で動いてます)
RubyGems version             0.8.11
Rails version                1.1.2
Active Record version        1.14.2
Action Pack version          1.12.1
Action Web Service version   1.1.2
Action Mailer version        1.2.1
Active Support version       1.3.1
postgres-pr                       0.4.0
gemで普通にrails1.1.2をインストールしましたが、webrickが起動しませんでした。
しばらく何かを読み込もうとした後に黙って落ちる感じ。
これに関しては、以下のパッチをあてることで無理矢理動くようにしました。
<diff>
--- server.rb.orig	2006-04-15 23:35:53.951011504 +0900
+++ server.rb	2006-04-15 23:37:10.935308112 +0900
@@ -13,7 +13,7 @@
   when "webrick"
     ARGV.shift
   else
-    if RUBY_PLATFORM !~ /mswin/ && !silence_stderr { `lighttpd
-version` }.blank? && defined?(FCGI)
+    if RUBY_PLATFORM !~ /(:?mswin|mingw32)/ && !silence_stderr {
`lighttpd -version` }.blank? && defined?(FCGI)
       "lighttpd"
     else
       "webrick"
</diff>

この状態でDBをmysqlにした場合は、ちゃんと動くことを確認しました。(scaffoldで。)
で、本当はPostgreSQLを使いたかったので、新しくアプリケーションを作成してみたところ以下のようなエラーメッセージが表示されました(長いので後ろです)。作成したアプリケーションはチュートリアルのcookbookです。

一応、irbで直接ActiveRecordを読み込んでPostgreSQLを叩いてみたんですが、同じようなエラーメッセージが表示されました。WindowsからDebian上で動いているPostgreSQLも叩いてみたんですが、同様でした。(同じコードをDebian上で動かすと動きました。)

もう一つ試したのはInstantRails1.0のrubyを使って、同じようにPostgreSQLを使おうとしてみました(rails-1.0.0とrails-1.1.2(gemであげた))が、結果は同様でした。

どなたか、この現象を解決する方法を知っている方はいませんか?
よろしくお願いします。

エラーメッセージ
Errno::EINVAL in RecipeController#list
Invalid argument
RAILS_ROOT: script/../config/..

Application Trace | Framework Trace | Full Trace

c:/Ruby/usr/local/lib/ruby/1.8/readbytes.rb:16:in `read'
c:/Ruby/usr/local/lib/ruby/1.8/readbytes.rb:16:in `readbytes'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:32:in
`read'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:30:in
`initialize'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:29:in
`initialize'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:23:in
`initialize'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/postgresql_adapter.rb:24:in
`postgresql_connection'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
`connection_without_query_cache='
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/query_cache.rb:54:in
`connection='
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in
`retrieve_connection'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:696:in
`columns'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:213:in
`column_for'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:135:in
`calculate'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:64:in
`count'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:172:in
`count_collection_for_pagination'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:196:in
`paginator_and_collection_for'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in
`paginate'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/scaffolding.rb:109:in
`list'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
`perform_action_without_filters'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
`perform_action_without_benchmark'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
c:/Ruby/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
`perform_action'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in
`process_without_filters'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
`process'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in
`handle_dispatch'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in
`service'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in
`dispatch'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59
c:/Ruby/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30
c:/Ruby/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
script/server:3
c:/Ruby/usr/local/lib/ruby/1.8/readbytes.rb:16:in `read'
c:/Ruby/usr/local/lib/ruby/1.8/readbytes.rb:16:in `readbytes'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:32:in
`read'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:30:in
`initialize'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:29:in
`initialize'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:23:in
`initialize'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/postgresql_adapter.rb:24:in
`postgresql_connection'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
`connection_without_query_cache='
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/query_cache.rb:54:in
`connection='
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in
`retrieve_connection'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:696:in
`columns'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:213:in
`column_for'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:135:in
`calculate'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:64:in
`count'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:172:in
`count_collection_for_pagination'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:196:in
`paginator_and_collection_for'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/pagination.rb:129:in
`paginate'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/scaffolding.rb:109:in
`list'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
`perform_action_without_filters'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
`perform_action_without_benchmark'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
c:/Ruby/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
`perform_action'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in
`process_without_filters'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
`process'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in
`handle_dispatch'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in
`service'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/Ruby/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in
`dispatch'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59
c:/Ruby/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30
c:/Ruby/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
c:/Ruby/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
script/server:3
Request
Parameters: None

Show session dump

---
flash: !map:ActionController::Flash::FlashHash {}


Response
Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}

--
okkez
okkez000@g...

--
ML: rails@r...
使い方: http://QuickML.com/

[前][次][番号順一覧][スレッド一覧]