Giter Club home page Giter Club logo

Comments (3)

ridem avatar ridem commented on May 30, 2024 11

What command did you use to initialize the project? bin/setup? This command should have created the database locally and populated it.

Otherwise, to set up the DB:

rails db:migrate:reset
rails db:seed

I recommend running bin/setup from the project root though

from spree_starter.

elliotec avatar elliotec commented on May 30, 2024 3

Ok, put a little more effort into it and found this:

http://stackoverflow.com/questions/17933522/postgres-on-rails-fatal-database-does-not-exist

The accepted answer worked for me, I just needed to rake db:create:all then rake db:migrate and it seems to have done the trick.

Perhaps if that command isn't in bin/setup I should create a PR to add it?

from spree_starter.

elliotec avatar elliotec commented on May 30, 2024

Yep, I used bin/setup, and tried both those commands already. Same error each time:

rails aborted!
ActiveRecord::NoDatabaseError: FATAL:  database "spark-starter-kit_development" does not exist
/Users/melliott/sparkSpree/spark-starter-kit/config/environment.rb:5:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
PG::ConnectionBad: FATAL:  database "spark-starter-kit_development" does not exist
/Users/melliott/sparkSpree/spark-starter-kit/config/environment.rb:5:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:abort_if_pending_migrations => environment
(See full trace by running task with --trace)

I'm thinking it's a Postgress problem rather than Rails but I've never had PG problems before and this seems unique to this project.

from spree_starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.