title: Importing postgres database to new local setup of Rails Project
body: <p>I am trying to import the old database (postgre sql) to a new setup of the same application in local environment which is built using Ruby On Rails. i am very amateur in ROR i have a dump file of database (extension .dmp) and schema.rb looks good to me. but every 'rake' command results in a same error and i am not able to trace the problem. i really need some solution for this.... the error is as following.....</p>
  
  <p>`</p>
  
  <pre><code>Cynosures-Mac-mini:sunridgerv cynosure$ bundle exec rake db:schema:load
  rake aborted!
  PG::Error: ERROR:  relation "rv_classes" does not exist
  LINE 4:              WHERE a.attrelid = '"rv_classes"'::regclass
                                          ^
  :             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"rv_classes"'::regclass
                 AND a.attnum &gt; 0 AND NOT a.attisdropped
               ORDER BY a.attnum
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:1061:in `exec'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:1061:in `exec_no_cache'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:615:in `block in exec_query'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:245:in `block in log'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:240:in `log'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:614:in `exec_query'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:1186:in `column_definitions'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:804:in `columns'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `block (2 levels) in initialize'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `with_connection'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:92:in `block in initialize'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:106:in `yield'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:106:in `default'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:106:in `block in initialize'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/base.rb:717:in `yield'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/base.rb:717:in `default'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/base.rb:717:in `columns_hash'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/locking/optimistic.rb:145:in `locking_enabled?'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/relation.rb:111:in `to_a'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/relation/finder_methods.rb:159:in `all'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.1.10/lib/active_record/base.rb:441:in `all'
  /Users/cynosure/Documents/myapp/sunridgerv/app/models/rv_class.rb:7:in `&lt;class:RvClass&gt;'
  /Users/cynosure/Documents/myapp/sunridgerv/app/models/rv_class.rb:1:in `&lt;top (required)&gt;'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:456:in `load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:456:in `block in load_file'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:in `new_constants_in'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:455:in `load_file'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:342:in `require_or_load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:489:in `load_missing_constant'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:181:in `block in const_missing'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:179:in `each'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:179:in `const_missing'
  /Users/cynosure/Documents/myapp/sunridgerv/app/admin/rv_classes.rb:1:in `&lt;top (required)&gt;'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in `load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in `block in load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `block in load_dependency'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:in `new_constants_in'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `load_dependency'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in `load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/application.rb:164:in `block in load!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/application.rb:164:in `each'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/application.rb:164:in `load!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/application.rb:182:in `routes'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin.rb:74:in `routes'
  /Users/cynosure/Documents/myapp/sunridgerv/config/routes.rb:32:in `block in &lt;top (required)&gt;'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.1.10/lib/action_dispatch/routing/route_set.rb:264:in `instance_exec'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.1.10/lib/action_dispatch/routing/route_set.rb:264:in `eval_block'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.1.10/lib/action_dispatch/routing/route_set.rb:241:in `draw'
  /Users/cynosure/Documents/myapp/sunridgerv/config/routes.rb:2:in `&lt;top (required)&gt;'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in `load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in `block in load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `block in load_dependency'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:in `new_constants_in'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `load_dependency'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in `load'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:29:in `block in load_paths'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:29:in `each'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:29:in `load_paths'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:13:in `reload!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application.rb:87:in `reload_routes!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/reloader.rb:34:in `reload!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/reloader.rb:97:in `reload!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/reloader.rb:92:in `block in initialize'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/file_update_checker.rb:32:in `call'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/reloader.rb:83:in `execute_if_updated'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bundler/gems/active_admin-d7c784a2f1b1/lib/active_admin/reloader.rb:109:in `block in attach!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/callbacks.rb:404:in `_run_prepare_callbacks'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/callbacks.rb:81:in `run_callbacks'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.1.10/lib/action_dispatch/middleware/reloader.rb:46:in `prepare!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application/finisher.rb:41:in `block in &lt;module:Finisher&gt;'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/initializable.rb:30:in `instance_exec'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/initializable.rb:30:in `run'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/initializable.rb:55:in `block in run_initializers'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/initializable.rb:54:in `each'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/initializable.rb:54:in `run_initializers'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application.rb:96:in `initialize!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
  /Users/cynosure/Documents/myapp/sunridgerv/config/environment.rb:5:in `&lt;top (required)&gt;'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `require'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `block in require'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `block in load_dependency'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:in `new_constants_in'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `load_dependency'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `require'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application.rb:83:in `require_environment!'
  /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.1.10/lib/rails/application.rb:203:in `block (2 levels) in initialize_tasks'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
  /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `&lt;main&gt;'
  Tasks: TOP =&gt; db:schema:load =&gt; environment
  </code></pre>
  
  <p>`</p>