rails server not starting after switching form version 4 to version 3 - ruby-on-rails

I am using rails version 3.2.6 and i recently downgraded from 4.0 because i wanted to work on a 3 version environment because the tutorial im following they are using version 3.
I am on a windows 7 machine and this is what i have done so far.
i first did gem install rails -v 3.2.6
then i did gem uninstall rails, and chose the version i wanted to install.
i then downgraded the gem that were dependent on rails version 4 and i was not getting any errors when running bundle install.
now when i try to do rails s to see what broke on my page the server never starts and i get a bunch of file names:
=> Booting WEBrick
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/dynamic_matchers.rb:50:in `method_missing'C:/Ruby200- x64/lib/ruby/gems/2.0.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: already initialized constant ActiveRecord::Base::OrmAdapter
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: previous definition of OrmAdapter was here
: undefined method `migration_error=' for #<Class:0x000000053c7850> (NoMethodError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:65:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:65:in `block (2 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/base.rb:721:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/devise-3.2.4/lib/devise/orm/active_record.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Users/Beans/Desktop/TestMaker/config/initializers/devise.rb:22:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/devise-3.2.4/lib/devise.rb:288:in `setup'
from C:/Users/Beans/Desktop/TestMaker/config/initializers/devise.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `block in load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:587:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:587:in `block in <class:Engine>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Users/Beans/Desktop/TestMaker/config/environment.rb:5:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Users/Beans/Desktop/TestMaker/config.ru:3:in `block in <main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from C:/Users/Beans/Desktop/TestMaker/config.ru:in `new'
from C:/Users/Beans/Desktop/TestMaker/config.ru:in `<main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands/server.rb:46:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands/server.rb:70:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:55:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
i know this might be a bunch of garbage to some, but if someone could help me that would be awesome. if you need more information, please let me know.
thank you in advance.

Since i am using rails on windows, RVM does not work, so i used the pik gem and with that i changed my environment to 3.2.6 and then it worked fine.

Related

Deprecation error for rails stopping me from launching rails server

I am doing some open source stuff for the rails app https://github.com/publiclab/mapknitter but when I try to launch the rails server using rails s I get the following error message:
DEPRECATION WARNING: Support for Rails versions before 4.2 is deprecated and will be removed from skylight 2.0. (called from require at /Users/bena/.rvm/rubies/ruby-2.4.6/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81)
=> Booting WEBrick
=> Rails 3.2.22.5 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[SKYLIGHT] [1.7.2] Running Skylight in development mode. No data will be reported until you deploy your app.
(To disable this message for all local apps, run `skylight disable_dev_warning`.)
Exiting
/Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application/configuration.rb:115:in `read': No such file or directory # rb_sysopen - /Users/bena/Documents/repos/ben-repos/mapknitter/config/database.yml (Errno::ENOENT)
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application/configuration.rb:115:in `database_configuration'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activerecord-3.2.22.5/lib/active_record/railtie.rb:84:in `block (2 levels) in <class:Railtie>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activerecord-3.2.22.5/lib/active_record/base.rb:720:in `<top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in `require'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config/initializers/column_definition.rb:19:in `<class:ColumnDefinition>'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config/initializers/column_definition.rb:17:in `<top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `load'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `load'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `each'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `run'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:in `each'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application.rb:136:in `initialize!'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config/environment.rb:5:in `<top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:3:in `block in <main>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:in `new'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:in `<main>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands/server.rb:46:in `app'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands/server.rb:70:in `start'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:50:in `tap'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Is the problem caused by the the version of rails I am using or the version of skylight or something else entirely?
I am using ruby 2.4.6p354 and rails 3.2.22.5
I have installed and tried to switch to rails 4.2.0 but that doesn't seem to be working, I think because in the gemfile there is a pessimistic version constraint of gem "rails" ,"~>3.2" but I could be completely wrong. I have been told not to change the gemfile.
Check first line in error backtrace. You dont have /config/database.yml in your project
No such file or directory # rb_sysopen -
/Users/bena/Documents/repos/ben-repos/mapknitter/config/database.yml
(Errno::ENOENT)
Make sure you install everything from Prerequisites and simply follow Installation guide

Ruby on Rails server won't run [duplicate]

This question already has answers here:
Error launching Rails server: undefined method 'configure'
(5 answers)
Closed 8 years ago.
Why is my server not running when I try to start my application? I have node.js installed and I believe I have execjs installed as well which neither fixed the issue. No idea what the problem is. Yes I am new so cut me some slack please! Thanks
C:\Users\My-Name\first_app>rails server
=> Booting WEBrick
=> Rails 4.0.8 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
C:/Users/My-Name/first_app/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<FirstApp::Application:0x3b67c30>(NoMethodError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/engine.rb:590:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/engine.rb:590:in `block in <class:Engine>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:30:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:44:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:44:in `tsort_each_child'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/application.rb:215:in `initialize!'
from C:/Users/Devin Miller/first_app/config/environment.rb:5:in `<top (required)>'
from C:/Users/Devin Miller/first_app/config.ru:3:in `require'
from C:/Users/Devin Miller/first_app/config.ru:3:in `block in <main>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from C:/Users/Devin Miller/first_app/config.ru:in `new'
from C:/Users/Devin Miller/first_app/config.ru:in `<main>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/commands/server.rb:48:in `app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/commands/server.rb:75:in `start'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `tap'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
FirstApp? I guess you are taking the Hartl's tutorial. How did you install rails?
If you installed via rails installer for windows, probably you have a version higher than 4.0.8 and you manually switched version in Gemfile which is not good in this case. If this is the scenario, install 4.0.8 from the beginning and create firstapp with it. [1]
There are few syntax changes for development.rb, buy I think even if you manually change text there it will not work. You can try changing Rails.application.configure.do to FirstApp::Application.configure.do
Please tell me how is going. I will try to update my answer when you give more information.
[1]:
$ rails -v
$ gem uninstall rails --version VERSION
$ gem install rails --version VERSION

Can not start rails server after changing gem file

I just started the Ruby on Rails Tutorial by Michael Hartl. I am currently trying to get the exact same gems versions (listing 1.5 in the book) he uses to avoid future problems. I managed to run bundle update and bundle install with no problems but when I try to start the server by rails server I get error you will see below.
The only main difference I can spot between his dev environment and mine is that I use rbenv and set the local ruby version for the project to 2.0.0-p353, and he uses RVM with ruby version 2.0.0. Could this be causing the problem? I can't find a ruby 2.0.0 version (without any -p...) on rbenv.
Thank you for your help!!
=> Booting WEBrick
=> Rails 4.0.5 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/eduardopoleo/Desktop/rails_projects/first_app/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<FirstApp::Application:0x007ff71196dee8> (NoMethodError)
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `require'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `require'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:in `each'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:in `block in <class:Engine>'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:in `run'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:in `each'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/application.rb:215:in `initialize!'
from /Users/eduardopoleo/Desktop/rails_projects/first_app/config/environment.rb:5:in `<top (required)>'
from /Users/eduardopoleo/Desktop/rails_projects/first_app/config.ru:3:in `require'
from /Users/eduardopoleo/Desktop/rails_projects/first_app/config.ru:3:in `block in <main>'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/eduardopoleo/Desktop/rails_projects/first_app/config.ru:in `new'
from /Users/eduardopoleo/Desktop/rails_projects/first_app/config.ru:in `<main>'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/commands/server.rb:48:in `app'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/commands/server.rb:75:in `start'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:71:in `tap'
from /Users/eduardopoleo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:8:in `require'
from bin/rails:8:in `<main>'

Spree 2 - Advanced Reporting - Rails 4 - Run Error

Has anyone successfully tried to install Advanced Reporting using Rails 4?
I've successfully installed Spree 2 and was able to get the initial site up and running without this gem. However, this gem throws an error while running rails s, in the development environmnet.
Error message received when: rails s
D:\work\projects\ror\clientsite.com\sites\deals.clientsite.com>rails s
DL is deprecated, please use Fiddle
D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/ruport-util-0.14.0/lib/ruport/util/graph/amline.rb:105: warning: undefining `object_id' may cause serious problems
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load': cannot load such file -- D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/bundler/gems/spree_active_shipping-057d7d306cdc/lib/spree_active_shipping/../../app/models/spree/calculator/shipping/canada_post/priority_worldwide_intl.rb (LoadError)
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/bundler/gems/spree_active_shipping-057d7d306cdc/lib/spree_active_shipping/engine.rb:32:in `block (2 levels) in <class:Engine>'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/bundler/gems/spree_active_shipping-057d7d306cdc/lib/spree_active_shipping/engine.rb:31:in `each'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/bundler/gems/spree_active_shipping-057d7d306cdc/lib/spree_active_shipping/engine.rb:31:in `block in <class:Engine>'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/ruby/Ruby200/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from C:/ruby/Ruby200/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from C:/ruby/Ruby200/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from C:/ruby/Ruby200/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from C:/ruby/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each'
from C:/ruby/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from C:/ruby/Ruby200/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/config/environment.rb:5:in `<top (required)>'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/config.ru:3:in `block in <main>'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/config.ru:in `new'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/config.ru:in `<main>'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in `app'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in `start'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:78:in `block in <top (required)>'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from D:/work/projects/ror/clientsite.com/sites/deals.clientsite.com/vendor/extensions/advanced_reporting/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Error running cloned ruby project

I have cloned a ruby on rails project from bitbucket and source tree. When I try to run the project, using rails server, I get following error
rails server
=> Booting WEBrick
=> Rails 3.0.10 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties- 3.0.10/lib/rails/application/configuration.rb:88:in `read': No such file or directory - /Users/xyz/newderbywire/config/database.yml (Errno::ENOENT)
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/application/configuration.rb:88:in `database_configuration'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.0.10/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.0.10/lib/active_record/railtie.rb:57:in `block in <class:Railtie>'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `run'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:50:in `block in run_initializers'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `each'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/application.rb:134:in `initialize!'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/application.rb:77:in `method_missing'
from /Users/xyz/newderbywire/config/environment.rb:5:in `<top (required)>'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:in `new_constants_in'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/xyz/newderbywire/config.ru:3:in `block in <main>'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:46:in `instance_eval'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:46:in `initialize'
from /Users/xyz/newderbywire/config.ru:1:in `new'
from /Users/xyz/newderbywire/config.ru:1:in `<main>'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:35:in `eval'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/builder.rb:35:in `parse_file'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/server.rb:162:in `app'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/server.rb:253:in `wrapped_app'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.5/lib/rack/server.rb:204:in `start'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands/server.rb:65:in `start'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:30:in `block in <top (required)>'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:27:in `tap'
from /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Can anyone tell me what might be the issue?
Ruby on Rails applications, like most web applications, are usually backed by a database. You specify how to connect to the database in the <project directory>/config/database.yml file. Since this configuration is usually specific to a particular machine, many projects don't include the file in their public source trees.
In this case, you need to create the file and fill in the details yourself. See https://gist.github.com/961978 for example database.yml files for different database servers.

Resources