New Ruby app with postgresql gets active-record sqlite3 errors -


i started new app rails new myapp --database=postgresql can't start developing because happens. console:

$ rails generate controller home warning: running `gem pristine --all` regenerate installed gemspecs (and deleting reinstalling bundle if use bundle --path) improve startup performance of spring. /library/ruby/gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': specified 'sqlite3' database adapter, gem not loaded. add `gem 'sqlite3'` gemfile (and ensure version @ minimum required activerecord). (gem::loaderror) 

however gem file:

source 'https://rubygems.org'   # bundle edge rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.1' # use postgresql database active record gem 'pg' # use scss stylesheets gem 'sass-rails', '~> 5.0' # use uglifier compressor javascript assets gem 'uglifier', '>= 1.3.0' # use coffeescript .coffee assets , views gem 'coffee-rails', '~> 4.1.0' # see https://github.com/rails/execjs#readme more supported runtimes # gem 'therubyracer', platforms: :ruby  # use jquery javascript library gem 'jquery-rails' # turbolinks makes following links in web application faster. read more: https://github.com/rails/turbolinks gem 'turbolinks' # build json apis ease. read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates api under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc  # twitter bootstrap gem 'twitter-bootstrap-rails', '~> 3.2.0' # devise user authentication gem 'devise', '~> 3.4.1' # github oauth2 gem 'omniauth-github', '~> 1.1.2' # facebook oauth2 gem 'omniauth-facebook' # dribbble oauth gem 'omniauth-dribbble', '~> 0.0.1' # linkedin oauth2 gem "linkedin-oauth2", "~> 1.0" # enable features such static asset serving , logging on heroku gem 'rails_12factor', group: :production  # use activemodel has_secure_password # gem 'bcrypt', '~> 3.1.7'  # use unicorn app server # gem 'unicorn'  # use capistrano deployment # gem 'capistrano-rails', group: :development  group :development, :test   # call 'byebug' anywhere in code stop execution , debugger console   gem 'byebug'    # access irb console on exception pages or using <%= console %> in views   gem 'web-console', '~> 2.0'    # spring speeds development keeping application running in background. read more: https://github.com/rails/spring   gem 'spring' end 

this database.yml:

# postgresql. versions 8.2 , supported. # # install pg driver: #   gem install pg # on os x homebrew: #   gem install pg -- --with-pg-config=/usr/local/bin/pg_config # on os x macports: #   gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config # on windows: #   gem install pg #       choose win32 build. #       install postgresql , put /bin directory on path. # # configure using gemfile # gem 'pg' # default: &default   adapter: postgresql   encoding: unicode   # details on connection pooling, see rails configuration guide   # http://guides.rubyonrails.org/configuring.html#database-pooling   pool: 5  development:   <<: *default   database: myapp_development   username: myapp   password: password   host: localhost   port: 5432     # schema search path. server defaults $user,public   #schema_search_path: myapp,sharedapp,public    # minimum log levels, in increasing order:   #   debug5, debug4, debug3, debug2, debug1,   #   log, notice, warning, error, fatal, , panic   # defaults warning.   #min_messages: notice  # warning: database defined "test" erased , # re-generated development database when run "rake". # not set db same development or production. test:   <<: *default   database: myapp_test  # config/secrets.yml, never want store sensitive information, # database password, in source code. if source code # ever seen anyone, have access database. # # instead, provide password unix environment variable when boot # app. read http://guides.rubyonrails.org/configuring.html#configuring-a-database # full rundown on how provide these environment variables in # production deployment. # # on heroku , other platform providers, may have full connection url # available environment variable. example: # #   database_url="postgres://myuser:mypass@localhost/somedatabase" # # can use database configuration with: # #   production: #     url: <%= env['database_url'] %> # production:   <<: *default   database: myapp_production   username: myapp   password: <%= env['myapp_database_password'] %> 

my gemfile.lock free of sqlite3 , haven't been able find solution past 2 days after starting scratch couple of times.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -