Spork error in Rails 4 - ruby-on-rails

Using RSpec, Rails
Preloading Rails environment
Loading Spork.prefork block...
no implicit conversion of nil into String (TypeError)
no implicit conversion of nil into String (TypeError)
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:26:in `initialize'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:26:in `new'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:26:in `sqlite3_connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'
/Users/me/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/Users/me/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_handling.rb:79:in `retrieve_connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/connection_handling.rb:53:in `connection'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/migration.rb:796:in `current_version'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/migration.rb:804:in `needs_migration?'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activerecord-4.0.4/lib/active_record/migration.rb:383:in `check_pending!'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/spec/spec_helper.rb:23:in `block in <top (required)>'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork.rb:24:in `prefork'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/spec/spec_helper.rb:6:in `<top (required)>'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:223:in `load'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:223:in `block in load'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:223:in `load'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork/test_framework.rb:138:in `block (2 levels) in preload'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-rails-4.0.0/lib/spork/app_framework/rails.rb:8:in `preload'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork/test_framework.rb:134:in `block in preload'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork.rb:62:in `exec_prefork'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork/test_framework.rb:120:in `preload'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:25:in `preload'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork/runner.rb:75:in `run'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/lib/spork/runner.rb:10:in `run'
/Users/me/Desktop/rails_stuff/rails_projects/sample_app/vendor/bundle/gems/spork-1.0.0rc4/bin/spork:10:in `<top (required)>'
/Users/me/.rvm/gems/ruby-2.1.1/bin/spork:23:in `load'
/Users/me/.rvm/gems/ruby-2.1.1/bin/spork:23:in `<main>'
/Users/me/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/Users/me/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'

Figured it out... corrupt bundle. I needed to rebuild my bundle after upgrading from Mac OS 10.8 to 10.9. I deleted my vendor\bundle directory and ran bundle install.

Related

Unknown database error on rails upgrade from rails 5.1.7 to rails 5.2.6 while running rails db:create

/Desktop/.rvm/gems/ruby-2.4.2/gems/mysql2-0.4.10/lib/mysql2/client.rb:89:in `connect'
/Desktop/.rvm/gems/ruby-2.4.2/gems/mysql2-0.4.10/lib/mysql2/client.rb:89:in `initialize'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `new'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/connection_handling.rb:90:in `connection'
/Desktop/.rvm/gems/ruby-2.4.2/gems/ar-octopus-0.10.2/lib/octopus/model.rb:159:in `connection_with_octopus'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activerecord-5.2.6/lib/active_record/model_schema.rb:324:in `table_exists?'
(eval):2:in `strip_attributes'
/Desktop/platform/app/models/user.rb:234:in `<class:User>'
/Desktop/platform/app/models/user.rb:1:in `<top (required)>'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:476:in `load'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:476:in `block in load_file'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:661:in `new_constants_in'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:475:in `load_file'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:373:in `block in require_or_load'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies/interlock.rb:13:in `loading'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:37:in `load_interlock'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:356:in `require_or_load'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:510:in `load_missing_constant'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:195:in `const_missing'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:542:in `load_missing_constant'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:195:in `const_missing'
/Desktop/platform/app/models/enterprise_api/v1/user.rb:2:in `<module:EnterpriseApi>'
/Desktop/platform/app/models/enterprise_api/v1/user.rb:1:in `<top (required)>'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:476:in `load'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:476:in `block in load_file'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:661:in `new_constants_in'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:475:in `load_file'
/Desktop/.rvm/gems/ruby-2.4.2/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:373:in `block in require_or_load'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:create => db:load_config => environment
(See full trace by running task with --trace)
gem 'mysql2', '~> 0.4.9'
Can someone please help me on this?

rails server command show errors

I am using Rails 3.2.15 and Ruby 2.3.1 on my Ubuntu system. Whenever I am trying to start server, I am getting these errors.
rails server
/var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/values/time_zone.rb:270:
warning: circular argument reference - now
=> Booting WEBrick
=> Rails 3.2.15 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Unsupported version: 2.2.11
For more information, read the documentation:http://pat.github.com/ts/en/advanced_config.html
Exiting
/var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/mysql2-0.3.18/lib/mysql2/client.rb:70:in `connect': Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) (Mysql2::Error)
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/mysql2-0.3.18/lib/mysql2/client.rb:70:in `initialize'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
from /usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
from /usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/model_schema.rb:310:in `clear_cache!'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activerecord-3.2.15/lib/active_record/railtie.rb:103:in `block (2 levels) in <class:Railtie>'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/callbacks.rb:418:in `_run__4005937425673360809__prepare__505669176022602409__callbacks'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/callbacks.rb:405:in `__run_callback'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/actionpack-3.2.15/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/actionpack-3.2.15/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /var/www/html/popthefizz.co.uk/releases/20131108040629/config/environment.rb:5:in `<top (required)>'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
from /var/www/html/popthefizz.co.uk/releases/20131108040629/config.ru:3:in `block in <main>'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /var/www/html/popthefizz.co.uk/releases/20131108040629/config.ru:in `new'
from /var/www/html/popthefizz.co.uk/releases/20131108040629/config.ru:in `<main>'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/commands/server.rb:46:in `app'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/commands/server.rb:70:in `start'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/commands.rb:55:in `block in <top (required)>'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/commands.rb:50:in `tap'
from /var/www/vhosts/popthefizz.co.uk/shared/bundle/ruby/2.3.0/gems/railties-3.2.15/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:7:in `require'
from script/rails:7:in `<main>'
Add this to your gem file
gem 'riddle', '1.5.1'
gem 'thinking-sphinx', '2.0.11', :require => "thinking_sphinx"
and run bundle

I can not create PostgreSQL database via prompt with Ruby on Rails

Hello Guys I'm trying to study Ruby On Rails but I can not continue reading a book written by
Brazilian author.
I was going step by step (A, B, C, D, see below) and PROPERLY INSTALLED POSTGRESQL
A) I installed Ruby correctly.
C:\rails>ruby -v
ruby 1.9.3p429 (2013-05-15) [i386-mingw32]
B) I installed Gems correctly.
C:\rails>gem -v
2.1.11
C) I installed all the gems RAILS correctly.
***************************** GEM INSTALADADAS ***********
gem install rubygems-update-1.3.1.gem
gem install rake-0.8.4.gem
gem install activesupport-1.4.4.gem
gem install activesupport-2.3.2.gem
gem install activerecord-1.15.6.gem
gem install activerecord-2.3.2.gem
gem install actionpack-1.13.6.gem REM ***
gem install actionpack-2.3.2.gem
gem install actionmailer-2.3.2.gem
gem install actionwebservice-1.2.6.gem
gem install activeresource-2.3.2.gem
gem install rails-2.3.2.gem
gem install postgres-pr-0.6.1.gem
D) Rails installed correctly.
C:\rails>rails -v
Rails 2.3.2
Getting run the following command
cd projetos
rails --database postgresql projeto01
Template created the perfect site.
When running the command
cd\projetos\projeto01
rake db:create
The following errors have appeared:
ERROR 1
C:\Projetos\projeto01>rake db:create
uninitialized constant PostgresPR::Connection::UNIXSocket
C:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependen
cies.rb:105:in `rescue in const_missing'
C:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependen
cies.rb:94:in `const_missing'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/connection.rb
:167:in `establish_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/connection.rb
:51:in `initialize'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/postgres-comp
at.rb:23:in `new'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/postgres-comp
at.rb:23:in `initialize'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:916:in `new'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:916:in `connect'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:210:in `initialize'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:37:in `new'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:223:in `new_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:188:in `block (2 levels) in checkout'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:184:in `loop'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:184:in `block in checkout'
C:/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:183:in `checkout'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:98:in `connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_specification.rb:115:in `connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/tasks/databases.rake:70:in `res
cue in create_database'
C:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/tasks/databases.rake:35:in `cre
ate_database'
C:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/tasks/databases.rake:31:in `blo
ck (2 levels) in <top (required)>'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in e
xecute'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in i
nvoke_with_call_chain'
C:/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_wit
h_call_chain'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:149:in `inv
oke_task'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `blo
ck (2 levels) in top_level'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `eac
h'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `blo
ck in top_level'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:115:in `run
_with_threads'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:100:in `top
_level'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:78:in `bloc
k in run'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `sta
ndard_exception_handling'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
C:/ruby/bin/rake:23:in `load'
C:/ruby/bin/rake:23:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"UTF-8", "dat
abase"=>"projeto01_development", "pool"=>5, "username"=>"exercicio_livro", "pass
word"=>"rails"}
C:\Projetos\projeto01>rake db:create
uninitialized constant PostgresPR::Connection::UNIXSocket
C:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependen
cies.rb:105:in `rescue in const_missing'
C:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependen
cies.rb:94:in `const_missing'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/connection.rb
:167:in `establish_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/connection.rb
:51:in `initialize'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/postgres-comp
at.rb:23:in `new'
C:/ruby/lib/ruby/gems/1.9.1/gems/postgres-pr-0.6.1/lib/postgres-pr/postgres-comp
at.rb:23:in `initialize'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:916:in `new'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:916:in `connect'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:210:in `initialize'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:37:in `new'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:223:in `new_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:188:in `block (2 levels) in checkout'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:184:in `loop'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:184:in `block in checkout'
C:/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:183:in `checkout'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:98:in `connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active_record/connection
_adapters/abstract/connection_specification.rb:115:in `connection'
C:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/tasks/databases.rake:70:in `res
cue in create_database'
C:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/tasks/databases.rake:35:in `cre
ate_database'
C:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/tasks/databases.rake:31:in `blo
ck (2 levels) in <top (required)>'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in e
xecute'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in i
nvoke_with_call_chain'
C:/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_wit
h_call_chain'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:149:in `inv
oke_task'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `blo
ck (2 levels) in top_level'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `eac
h'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `blo
ck in top_level'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:115:in `run
_with_threads'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:100:in `top
_level'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:78:in `bloc
k in run'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `sta
ndard_exception_handling'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
C:/ruby/lib/ruby/gems/1.9.1/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
C:/ruby/bin/rake:23:in `load'
C:/ruby/bin/rake:23:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"UTF-8", "dat
abase"=>"projeto01_development", "pool"=>5, "username"=>"exercicio_livro", "pass
word"=>"rails"}
C:\Projetos\projeto01
ERROR 2
C:\Projetos\projeto01> ruby script/server
C:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `requ
ire': cannot load such file -- script/../config/boot (LoadError)
from C:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.r
b:55:in `require'
from script/server:2:in `<main>'
You have postgres-pr gem in your Gemfile, as far as I know it is no longer supported by Rails, use pg gem instead.

(postgreSQL error) FATAL: role "demo" does not exist (PG::Error)

So I've just installed postgreSQL with HomeBrew and have initialized my new demo_app with the: rails new demo_app -d postgresql command.
Albeit, I am getting the following error when starting up the server rails s.
Snippit:
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize': FATAL: role "demo" does not exist (PG::Error)
Full log:
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize': FATAL: role "demo" does not exist (PG::Error)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `new'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `connect'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88:in `block in <class:Railtie>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/anthonypanepinto/Sites/new_demo/demo/config/environment.rb:5:in `<top (required)>'
from /Users/anthonypanepinto/Sites/new_demo/demo/config.ru:3:in `require'
from /Users/anthonypanepinto/Sites/new_demo/demo/config.ru:3:in `block in <main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/anthonypanepinto/Sites/new_demo/demo/config.ru:in `new'
from /Users/anthonypanepinto/Sites/new_demo/demo/config.ru:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
When your create rails app, you must create a database with postgres for that it works.
createdb demo
And check your config/database.yml

Error loading mysql2 when trying to run ruby app on localhost

I'm trying to run a ruby app i cloned from github on mylocalhost and get the following error when entering 'rails s' in the command:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': 126: The specified module could not be found. - C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'
from C:/Users/uklar/Documents/GitHub/Budget-Requests-New/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:53:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:53:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
C:\Users\uklar\Documents\GitHub\Budget-Requests-New [master +0 ~2 -0]>
Any ideas? Thanks!
Update: After downloading the libmysql.dll file and putting it in my ruby directory i get these messages:
=> Booting Thin
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/http/mime_type.rb:102: warning: already initialized constant JSON
Exiting
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/client.rb:44:in `connect': Can't connect to MySQL server on 'localhost' (10061) (Mysql2::Error)
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/client.rb:44:in `initialize'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:277:in `new_connection'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:287:in `checkout_new_connection'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:235:in `block (2 levels) in checkout'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:230:in `loop'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:230:in `block in checkout'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `checkout'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `retrieve_connection'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/model_schema.rb:308:in `clear_cache!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/railtie.rb:91:in `block (2 levels) in <class:Railtie>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:418:in `_run__435324379__prepare__609126447__callbacks'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `instance_exec'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `run'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `each'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `run_initializers'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/application.rb:136:in `initialize!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from c:/users/uklar/documents/github/budget-requests-new/config/environment.rb:5:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from c:/users/uklar/documents/github/budget-requests-new/config.ru:4:in `block in <main>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from c:/users/uklar/documents/github/budget-requests-new/config.ru:1:in `new'
from c:/users/uklar/documents/github/budget-requests-new/config.ru:1:in `<main>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands/server.rb:46:in `app'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands/server.rb:70:in `start'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:55:in `block in <top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Ok, so solution was:
Download libmysql.dll file and put it in ruby directory
open command prompt as administratoe and start the mysql server the following way:
C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld

Resources