Moving a Rails 3 app -
i'm new ruby on rails.
i need copy rails application own computer via git, have done. tried rails server
on app, threw bunch of dependency complaints have fixed.
but when run rails server
, server exits , receive following error message:
/var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/application/configuration.rb:86:in `read': no such file or directory - /home/d/desktop/ipr/urj/config/database.yml (errno::enoent) /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/application/configuration.rb:86:in `database_configuration' /var/lib/gems/1.8/gems/activerecord-3.0.0/lib/active_record/railtie.rb:58 /var/lib/gems/1.8/gems/activesupport-3.0.0/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval' /var/lib/gems/1.8/gems/activesupport-3.0.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook' /var/lib/gems/1.8/gems/activesupport-3.0.0/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks' /var/lib/gems/1.8/gems/activesupport-3.0.0/lib/active_support/lazy_load_hooks.rb:42:in `each' /var/lib/gems/1.8/gems/activesupport-3.0.0/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks' /var/lib/gems/1.8/gems/activerecord-3.0.0/lib/active_record/base.rb:1867 /var/lib/gems/1.8/gems/will_paginate-3.0.pre2/lib/will_paginate/finders/active_record.rb:31:in `enable!' /var/lib/gems/1.8/gems/will_paginate-3.0.pre2/lib/will_paginate/railtie.rb:9 /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `instance_exec' /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `run' /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:50:in `run_initializers' /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `each' /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `run_initializers' /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:134:in `initialize!' /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `send' /var/lib/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `method_missing' /home/d/desktop/ipr/urj/config/environment.rb:5 /home/d/desktop/ipr/urj/config.ru:3:in `require' /home/d/desktop/ipr/urj/config.ru:3 /var/lib/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval' /var/lib/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize' /home/d/desktop/ipr/urj/config.ru:1:in `new' /home/d/desktop/ipr/urj/config.ru:1
must copy database somehow?
run these commands:
bundle install rake db:schema:load rake db:test:prepare
also, make sure database.yml
file included in git repository. sometimes, default keeps file in .gitignore
, since different computers have different database configurations. if doesn't exist, might create new app rails new test
, copy database.yml
file over. after that, should set!
Comments
Post a Comment