Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't create db directory when skip active_record #26853

Merged
merged 1 commit into from
Oct 21, 2016

Conversation

zegomesjf
Copy link
Contributor

Hey all,

Actual behavior/Motivation

when using rails new my-app --skip-active-record

The db directory is created with seeds.rb file inside it.

and also because, the rails db:seed command doesn't work

$ rails db:seed
rails aborted!
Don't know how to build task 'db:seed' (see --tasks)

Expected behavior

I would not expect the db directory to exist

System configuration

Rails version: 5.0.0.1

Ruby version: 2.3.1

@guilleiguaran
Copy link
Member

What the command rails db:seed does after of applying this patch?

@zegomesjf
Copy link
Contributor Author

@guilleiguaran thanks to review,

the behaviour was not affected on this command, but I mean the seeds.rb file contains:

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

it gives the impression that the command should work.

@guilleiguaran
Copy link
Member

guilleiguaran commented Oct 21, 2016

@zegomesjf ah cool, thanks 👍

@guilleiguaran guilleiguaran merged commit a08ef99 into rails:master Oct 21, 2016
@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @kaspth (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.

Please see the contribution instructions for more information.

@zegomesjf zegomesjf deleted the feature/skip_active_record branch October 21, 2016 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants