rails:886
From: FUKUI Osamu <ofukui@g...>
Date: Thu, 19 Jan 2006 14:44:38 +0900
Subject: [rails:886] nonexistent postgres adapter (ActiveRecord::AdapterNotFound)
ML: rails@r... 新メンバー: ofukui@g... 福井です。#最近gmailに引越しつつあります。 Rails 1.0.0 で Linux Sarge のサーバ PostgreSQL 7.4.7 on i386-pc-linux-gnu, compiled by GCC i386-linux-gcc (GCC) 3.3.5 (Debian 1:3.3.5-12) と手元のWindowsXPのマシン PostgreSQL 8.1.2 on i686-mingw32, compiled by GCC i386-linux-gcc (GCC) 3.4.4 (mingw special) をソースを共通化(サーバにsubversionリポジトリ)して、開発しています。 Rails自体は、うまく動いていますが、ActiveRecordだけ使ってDB操作しようと babieさんの記事 【第 3 回】 O/R マッピング http://jp.rubyist.net/magazine/?0004-RLR を参考にやろうとしていますが、 nonexistent postgres adapter (ActiveRecord::AdapterNotFound) となりうまくゆきません。 Windows 側では、 > gem install postgres-pr で postgres-pr をインストールしてます。 このpostgres-pr にうまくつながらないようです。 どう対処すればよいか悩んでいます。お助けを。 [テストソース test.rb] require 'rubygems' p $LOAD_PATH require_gem 'activerecord' p $LOAD_PATH class Person < ActiveRecord::Base end ActiveRecord::Base.establish_connection( :adapter => 'postgres', :host => 'localhost', :username => 'rubyonrails', :password => 'hoge', :database => 'fuga' ) person = Person.new do |p| p.name = "name" end person.save [エラーメッセージ] ["c:/ruby/lib/ruby/site_ruby/1.8", "c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt", "c:/ruby/lib/ruby/site_ruby", "c:/ruby/lib/ruby/1.8", "c:/ruby/lib/ruby/1.8/i386-mswin32", "."] ["c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib", "c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/../../activesupport/lib", "c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/bin", "c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib", "c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/bin", "c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib", "c:/ruby/lib/ruby/site_ruby/1.8", "c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt", "c:/ruby/lib/ruby/site_ruby", "c:/ruby/lib/ruby/1.8", "c:/ruby/lib/ruby/1.8/i386-mswin32", "."] ["c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib", "c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/../../activesupport/lib", "c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/bin", "c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib", "c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/bin", "c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib", "c:/ruby/lib/ruby/site_ruby/1.8", "c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt", "c:/ruby/lib/ruby/site_ruby", "c:/ruby/lib/ruby/1.8", "c:/ruby/lib/ruby/1.8/i386-mswin32", "."] c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:81:in `establish_connection': database configuration specifies nonexistent postgres adapter (ActiveRecord::AdapterNotFound) from test.rb:8 なお C:\ruby\lib\ruby\gems\1.8\gems\activerecord-1.13.2\lib\active_record\connection_adapters\abstract\connection_specification.rb の79 にもp $LOAD_PATH 入れてみました。 def self.establish_connection(spec = nil) case spec when nil raise AdapterNotSpecified unless defined? RAILS_ENV establish_connection(RAILS_ENV) when ConnectionSpecification @@defined_connections[name] = spec when Symbol, String if configuration = configurations[spec.to_s] establish_connection(configuration) else raise AdapterNotSpecified, "#{spec} database is not configured" end else spec = spec.symbolize_keys p $LOAD_PATH unless spec.key?(:adapter) then raise AdapterNotSpecified, "database configuration does not specify adapter" end adapter_method = "#{spec[:adapter]}_connection" unless respond_to?(adapter_method) then raise AdapterNotFound, "database configuration specifies nonexistent #{spec[:adapter]} adapter" end remove_connection establish_connection(ConnectionSpecification.new(spec, adapter_method)) end end -- ML: rails@r... 使い方: http://QuickML.com/ このMLを退会する方法: - 本文が空のメールを <rails@r...> に送ってください - 本文が空のメールを送れない場合は、 本文に「退会」とだけ書いたメールを <rails@r...> に送ってください (署名やhotmailの広告などがついて空メールを送れない場合など) <rails@r...> のメンバー: kazuhiko@f... dan@d... kazuhiko-rails@f... qve02451@n... gollum@h... matz@r... sho@s... zn@m... babie7a0@y... shintaro@k... inoue@f... lemo@p... hoti_jp@y... dai_o@m... moriq@m... don@n... akira@a... maili31s@c... taoy@r... o-fukui@p... dj.ryumu@g... kida@n... nrtkszk@y... yuui.tanaka@n... yuu@t... uno@s... maki@r... terubo_x@y... aizawa@s... stoyan@g... tokuhama@c... keiichi.2004.matsunaga@g... ats7@a... abe@c... sino@e... tnakajima@b... ge6537@i... tsasaki@v... nowake@f... ko1@a... tam@q... matakagi@o... vis@e... arakitakaya@g... takashi.hatakeyama@g... nnakamur@m... yu1@t... imura@p... holy@e... moro@b... rubyinaction@g... jun@p... k_ryu@p... tacky3@g... bpbsi501@t... satoru@h... gunyoki@g... fg-180@a... AND54579@n... oka@m... shugo@r... bongole3@y... marvel_ml@p... ksmakoto@d... kouji@n... takata@b... yuichi_katahira@m... akimichi_tatsukawa@y... n.mutou@g... m.karibe@g... ryu.kurai@g... nakagawa@m... y.igarashi@g... ender@o... kimai@l... akimoto@g... manshiro@a... andore380@h... read.eval.print@g... jirokun@u... tommy.heartbeat@g... youhei@g... nnno77@g... drawn.boy@g... fukuda@n... utah.kawasaki@g... ouchi@b... satoru.hataya@g... Makoto.Nakagawa@h... iguchi@t... miyamuko@g... s-onishi@d... tanaka@k... yamamoto@g... funada@e... hage@p... jir@s... manabut@m... gunjisatoshi@g... mkamo@j... takamiya@m... chihuahua5000@g... reina07@l... kentaro.kawamoto@g... okada.kiyoshi@g... t@n... nana@p... rufein.mirage@g... t-makino@k... masakazu@r... nakabe64@a... suzk@o... t_kimata@n... boldwolf@g... walf443@g... something.tets@g... sharp12@g... kawaji@g... h-kajita@m... uda4ml@y... moda@a... okkez000@g... takeru@f... hide.nba@g... kobaya-n@s... melito@p... josch.so36@g... tokuhirom@g... toykyo@t... dewa@t... t_inada@a... richstyles+ruby@g... nsh@2... yanagi@s... kem@c... kenichi.tamura@g... nhirayam@s... satoshi-rails@a... sugi@n... jun@g... takahashi@t... hatamoto@p... nagao@t... takahashi@k... n@b... sasaki@s... kkobayas@m... tkawa@4... kuranuki@g... craftgear@a... 2005@e... hardfrost@g... ogijun@g... kawaguti@r... takahashi@r... snakagawa@i... psychs@d... sf0926@h... mukai@j... dot@a... enkimi@g... sakai@o... yuanying@f... shin@f... nakyuki@j... tomoya@c... takachin@g... nanki@m... tyumityumi@g... suzuki@u... shimurahiroyuki@o... ishihara_h@y... garbagetown@g... kowaindesukedo@g... hayasaka@t... osakanas@g... xml@t... j-goza@d... ku-takahashi@d... sishimar@c... nov@y... ikeyasu.ml@g... tnuma@m... skoji@s... take.ma@g... kitano.tk@g... iwai@a... holon@r... inudog@g... yasagure@u... someeda@g... masaki-sakurai@m... patama@g... h.nakashima@g... toshiki.ml@g... sakurai3650062@y... asora@t... oomori@n... hsasada@n... pakista07@y... ohta@e... nazoking@g... nk@n... sakuro@e... liniwamoto@i... nskj77@g... hai_sai@m... matsuis@g... has83340@s... webmaster@a... gungle@g... bamboog@g... shachi@j... ikasamt@y... sou.orz@g... nshttsk@n... xigly@n... pichon@g... mkinoshita@m... yken@g... mikuro05@n... ya-ma@i... t-ishikura@f... havana@h... kono@s... yukotan@g... qyi01472@m... hasimoto@a... flame@y... hayasaka.mitsuru@g... yoshi@o... isamu.kozuka@g... yugui@y... takeda.eiji@g... makoto@r... vinamu@c... ohtsuka@t... mig@i... lyo.kato@g... ysano@y... tcgrim@g... tksotn@a... k.iwaya@g... takashi.fujiwara@a... tec@m... kanouk@g... moronatural@g... hasegawa@j... yamaguci@d... kuboaki@c... zonotchi@m... akicoh@g... kasatani@g... naoki.yanai@g... ex8@a... kaz@y... kouse.k@g... takkanm@g... milfee@g... gollum.frodo@g... sakaki@t... ryus@h... shibano@a... sasaki_ror@m... takiuchi@k... togawamanabu@g... ikeda@d... tomotsugu@t... tsuruoka@r... e-hara@a... muramoto.eiichi@j... arton@e... fwkz0826@m... ofukui@g...
-> 886 2006-01-19 06:44 [ofukui@g... ] nonexistent postgres adapter (ActiveRecord::AdapterNotFound) 887 2006-01-19 06:51 ┣[moriq@m... ] 891 2006-01-19 07:10 ┃┗[ofukui@g... ] 888 2006-01-19 06:52 ┗[babie7a0@y... ] 889 2006-01-19 06:55 ┗[babie7a0@y... ] 893 2006-01-19 07:19 ┗[ofukui@g... ]