I have installed ruby 1.9.3-p327, and my databse is postgres.I modified the database.yml page also..as:evelopment:
アダプター:postgresqlデータベース:db_pchamaraユーザー名:db_test_userパスワード:パスワードホスト:192.168.1.101プール:5
テスト:アダプター:postgresqlデータベース:db_pchamara.testユーザー名:db_test_userパスワード:パスワードホスト:192.168.1.101プール:5
プロダクション:アダプター:postgresqlデータベース:db_pchamaraユーザー名:db_test_userパスワード:パスワードホスト:192.168.1.101プール:5。しかし、実行するrails server
と次のエラーが表示されるという問題に直面しています:postgredbに接続していません。
しかし、rubyファイルを実行すると、dbからデータが取得されます。これを手伝ってください。
ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):
activerecord (3.2.9) lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
activerecord (3.2.9) lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
activerecord (3.2.9) lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
activerecord (3.2.9) lib/active_record/query_cache.rb:67:in `rescue in call'
activerecord (3.2.9) lib/active_record/query_cache.rb:61:in `call'
activerecord (3.2.9) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `_run__241814793__call__597619238__callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.9) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.9) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.9) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.9) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.9) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.9) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.9) lib/rails/engine.rb:479:in `call'
railties (3.2.9) lib/rails/application.rb:223:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.9) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Rendered /usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.4ms)
Rendered /usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms)
Rendered /usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (9.6ms)
This is my gemfile.lock
Gems included by the bundle:
* actionmailer (3.2.9)
* actionpack (3.2.9)
* activemodel (3.2.9)
* activerecord (3.2.9)
* activeresource (3.2.9)
* activesupport (3.2.9)
* arel (3.0.2)
* builder (3.0.4)
* bundler (1.2.3)
* coffee-rails (3.2.2)
* coffee-script (2.2.0)
* coffee-script-source (1.4.0)
* erubis (2.7.0)
* execjs (1.4.0)
* hike (1.2.1)
* i18n (0.6.1)
* journey (1.0.4)
* jquery-rails (2.1.4)
* json (1.7.5)
* mail (2.4.4)
* mime-types (1.19)
* multi_json (1.4.0)
* pg (0.14.1)
* polyglot (0.3.3)
* rack (1.4.1)
* rack-cache (1.2)
* rack-ssl (1.3.2)
* rack-test (0.6.2)
* rails (3.2.9)
* railties (3.2.9)
* rake (10.0.2)
* rdoc (3.12)
* sass (3.2.3)
* sass-rails (3.2.5)
* sprockets (2.2.2)
* thor (0.16.0)
* tilt (1.3.3)
* treetop (1.4.12)
* tzinfo (0.3.35)
* uglifier (1.3.0)