Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.) - mysql

Trying to install gitlab
After I typed this:
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
I'm getting this error:
RAILS_ENV=production
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (myis not part of the bundle. Add it to Gemfile.)
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:25:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:74:in `block in <class:Railtie>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/git/gitlab/config/environment.rb:5:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:103:in `require_environment!'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
Tasks: TOP => gitlab:env:info => environment
(See full trace by running task with --trace)
Inside gem list:
activerecord-mysql2-adapter (0.0.3)
bigdecimal (1.2.0)
bundler (1.12.5)
charlock_holmes (0.6.9.4)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
modernizr-rails (2.6.2)
mysql2 (0.4.4)
psych (2.0.0)
rake (11.2.2, 0.9.6)
rdoc (4.0.0)
test-unit (2.0.0.0)
I have tried changing the adapter to MySQL2 in config/database.yml.

Related

MySQL gem is not installing on M1 mac

I am facing issue while installing MySQL gem on M1 mac. Bundle install fas failing to build mysql gem
An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
In Gemfile:
mysql2
Found a solution which suggested to install mysql2 gem using following command
$ arch -x86_64 gem install mysql2 -v 0.5.3 -- --srcdir=/usr/local/mysql/include
This actually solved bundle install issue, but when i tried rails c got this error.
$ rails c
/Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- mysql2/mysql2 (LoadError)
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/mysql2-0.5.3/lib/mysql2.rb:36:in `<main>'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:in `each'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:in `block in require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in `each'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler.rb:176:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:92:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:92:in `preload'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/maneeshb/.rvm/rubies/ruby-2.6.9/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/maneeshb/.rvm/rubies/ruby-2.6.9/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Please help me to solve this issue.
This solved the issue
brew install openssl zstd mysql
LIBRARY_PATH=$(brew --prefix zstd)/lib/:$(brew --prefix openssl)/lib/ gem install mysql2

Ruby on Rails installing - Ubuntu 15

I am trying to install RoR in Ubuntu 15(64 bit). I have done most of the installation process like installing rvm, ruby, mysql server, creating gemset.
rails new first_app
rvm gemset list
rvm gemset use rails3.2.13
rails new first_app
cd first_app/
bundle install
Above commads were executed successfully.
Ruby version 2.2.1
Rails version 3.2.13
When I am trying to start my server, I am getting error like below
rails s
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'coffee-rails'. (Bundler::GemRequireError)
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/ela/Documents/first_app/config/application.rb:7:in `<top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/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>'
My Gem file ::
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
Same error for 'uglifier' gem also so I removed those 2 gems. Then I am getting error in mysql adapter.
rails s
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/rubygems_integration.rb:314:in `block in replace_gem': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.10), already activated mysql2-0.4.2. Make sure all dependencies are added to Gemfile.) (LoadError)
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/base.rb:720:in `<top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88:in `block in <class:Railtie>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/ela/Documents/first_app/config/environment.rb:5:in `<top (required)>'
from /home/ela/Documents/first_app/config.ru:3:in `require'
from /home/ela/Documents/first_app/config.ru:3:in `block in <main>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /home/ela/Documents/first_app/config.ru:in `new'
from /home/ela/Documents/first_app/config.ru:in `<main>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/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>'
So I changed my gem mysql2 gem version to < 0.3
rake db:migrate --trace
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
============= WARNING FROM mysql2 =============
This version of mysql2 (0.2.24) isn't compatible with Rails 3.1 as the ActiveRecord adapter was pulled into Rails itself.
Please use the 0.3.x (or greater) releases if you plan on using it in Rails >= 3.1.x
============= END WARNING FROM mysql2 =============
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
rake aborted!
NoMethodError: undefined method `accept' for nil:NilClass
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `to_sql'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:587:in `get_all_versions'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:745:in `migrated'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:668:in `current_version'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `block in migrate'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `each'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `detect'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `migrate'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:570:in `up'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:551:in `migrate'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in `call'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in `each'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `each'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/home/ela/.rvm/rubies/ruby-2.2.1/bin/rake:33:in `<main>'
Tasks: TOP => db:migrate
Someone please help me. Thanks in advance.
install nodejs
sudo apt-get install nodejs
then use
bundle install

rails server not starting on rails 3.1.2

I am using rails 3.2.1 with ruby 1.9.3 on ubuntu 13.10 with rbenv I hace everything good but when I try to start the server it gives an error anybody who know anything related to this please help. In a great need.
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- uuid (LoadError)
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/ahmed/Insoshi-Rails-3/config/initializers/custom_requires.rb:17:in `<top (required)>'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:651:in `load_config_initializer'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:615:in `each'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `each'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:203:in `each_strongly_connected_component_from'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:180:in `each'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `public_send'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `method_missing'
from /home/ahmed/Insoshi-Rails-3/config/environment.rb:5:in `<top (required)>'
from /home/ahmed/Insoshi-Rails-3/config.ru:3:in `require'
from /home/ahmed/Insoshi-Rails-3/config.ru:3:in `block in <main>'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
from /home/ahmed/Insoshi-Rails-3/config.ru:in `new'
from /home/ahmed/Insoshi-Rails-3/config.ru:in `<main>'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>
It is possible that all dependencies are not installed. If you have not used rvm to install ruby, you should try using it to install your ruby version.
rvm install 1.9.3
or
rvm reinstall 1.9.3
refer https://rvm.io/rvm/install for step by step instructions.

Cant run rails server on ubuntu

I am working on ruby on rails,
I have made a project using
rails new proj -d mysql
and then I type
rails server
but get this error, whats the problem
/home/mani/.rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /home/mani/.rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs.rb:5:in `<module:ExecJS>'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs.rb:4:in `<top (required)>'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `require'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `<top (required)>'
from /home/mani/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.7.2/lib/bundler/runtime.rb:76:in `require'
from /home/mani/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.7.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/mani/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.7.2/lib/bundler/runtime.rb:72:in `each'
from /home/mani/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.7.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/mani/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.7.2/lib/bundler/runtime.rb:61:in `each'
from /home/mani/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.7.2/lib/bundler/runtime.rb:61:in `require'
from /home/mani/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.7.2/lib/bundler.rb:133:in `require'
from /home/mani/Sites/proj/config/application.rb:7:in `<top (required)>'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `require'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
from /home/mani/Sites/proj/bin/rails:8:in `require'
from /home/mani/Sites/proj/bin/rails:8:in `<top (required)>'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /home/mani/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/mani/Sites/proj/bin/spring:16:in `require'
from /home/mani/Sites/proj/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Add following gems in your Gemfile:
gem 'execjs'
gem 'therubyracer'
Run bundle install and now try to start rails server rails s
You can do this on your system
sudo apt-get install nodejs
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison nodejs subversion
Then restart your machine.

Rails server fails to boot with mysql2 - Gems it requires, exists

This is me trying to use MySql on rails for the first time. This happens with using sqlite3 as well except it points to me do 'gem install activerecord-sqlite3-adapter`,the tells me there is no such gem named it.
I am using the lastest Ruby 2.0.
I am using the lastest Rails 3.2.13
I have the mysql2 (0.3.11) gem
I also have the activerecord-mysql2-adapter (0.0.3)
Yet... it is giving me the following message:
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in 'block in replace_gem': Please install the mysql2 adapter: 'gem install activerecord-mysql2-adapter' (mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError)
The bundler ran when I executed rails new [project name]
If it was mysql2 gem's error, this command successfully installs mysql2 on 64 bit Windows systems:gem install mysql2 -v '0.3.11' -- '--with-mysql-lib="C:\MySQL\lib" --with-mysql-include="C:\MySQL\include"'
Gemfile generated is using gem 'mysql2'ok, normal as I have been told.
Database.yml is as follows:
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: shop_development
pool: 5
username: charlie
password: *******
host: localhost
And I have manually created a database called [projectname]_development.
C:\Users\Charlie\Documents\RailsProject\demo_app>rails s
=> Booting WEBrick
=> Rails 3.2.13 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/bundler-1.3.5/lib/bundler/rubygems_integ
ration.rb:214:in `block in replace_gem': Please install the mysql2 adapter: `gem
install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it
to Gemfile.) (LoadError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:50:in `resol
ve_hash_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:41:in `resol
ve_string_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:130:in `esta
blish_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_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.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/base.rb:720:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:88:in `block in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `instance_exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:55:in `block in run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/a
pplication.rb:136:in `initialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/r
ailtie/configurable.rb:30:in `method_missing'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config/environment
.rb:5:in `<top (required)>'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config.ru:3:in `re
quire'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config.ru:3:in `bl
ock 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/Charlie/Documents/RailsProject/demo_app/config.ru:in `new'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config.ru:in `<mai
n>'
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.13/lib/rails/c
ommands/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.13/lib/rails/c
ommands/server.rb:70:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:55:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Check for following things
Does your Gemfile have the entry saying gem 'mysql2' ?
What happens when you run $ bundle update command? any errors
Can you try the following command to generate your app,
rails new demo_app -d mysql
What error you get when you try the above app?