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

development database is not configured #40

Closed
professor opened this issue Apr 16, 2011 · 10 comments
Closed

development database is not configured #40

professor opened this issue Apr 16, 2011 · 10 comments

Comments

@professor
Copy link
Contributor

Goldberg is working nicely on my development machine. I'm now installing it on my CI machine. (I stole my database.yml file from a cruise control project.) It only had the test database environment defined. It appears that Goldberg also wants the development database configured. I'm guessing we need a RAILS_ENV="test" on one of the rake commands to fix this.

@srushti
Copy link
Owner

srushti commented Apr 16, 2011

Depending on how you run it you'll have to do RAILS_ENV="development" (which is implicit) or RAILS_ENV=production. "test" should only be used to run goldberg's own tests.

@aakashd
Copy link
Contributor

aakashd commented Apr 16, 2011

@srushti, I did not get what you mean by goldberg's own tests.

Although, I won't be comfortable hardcoding RAILS_ENV=test, because if someone wants to override it or change it, they won't be able to do so because of this hardcoding. We can probably mention in the documentation that, people can mention RAILS_ENV=test in the custom command if this is intended behavior.

@srushti
Copy link
Owner

srushti commented Apr 16, 2011

@aakashd Maybe I misunderstood the original problem, but it looked like he only had goldberg's test database configured & defined. I was mentioning that you don't want to run goldberg on the test database, since that is to be used to run goldberg's own specs, and that while running the app you want to use one of the other two configurations (after having defined it in the database.yml, of course).

@professor
Copy link
Contributor Author

I expect goldberg to act as a continuous integration platform. As such, I expect it to run my tests and only my tests against my code. If it is running my tests (ie my rspecs), then I expect goldberg to execute them against my test database. I don't know why I should have created a development database for goldberg to function.

I believe the original intent of goldberg was to run on a local development machine. If this the case, it explains why you haven't seen this error before. I'd like to run goldberg on a standalone continuous integration machine. It's my plan to have 20 projects being tested on this machine. That's why I'd like to just create the needed 20 test databases for those projects, (not the 20 test databases plus the unnecessary 20 development databases).

If this isn't making sense, I'd be happy to setup a skype call.

To review, I expect RAILS_ENV=test to be the default behavior

@srushti
Copy link
Owner

srushti commented Apr 16, 2011

The situation you describe makes sense, but I must be missing something, because I'm not sure what exactly you want. Possibly, @aakashd understood it better. I've replied directly to the email address from your commits with my skype id. Let me know what a good time is to have that call.

@professor
Copy link
Contributor Author

Thanks for the great skype call. I'll ask around here to see if I"m the only person who sets up their CI environment with just test databases or if it is standard practice to setup a test and development database. (If its the later, I'll conform to the norm.)

@srushti
Copy link
Owner

srushti commented May 2, 2011

I'm closing this since we now have the ability to do what you want in a more generic way. You can add environment_variables through goldberg_config, which in your case would be "RAILS_ENV=test".
It looks like cc.rb does do this by default, but I'm still not sure we want to be prescribing this.

@srushti srushti closed this as completed May 2, 2011
@professor
Copy link
Contributor Author

I've asked around locally here in Silicon Valley, and quite a few people
think that a build machine should NOT have a development database.

Todd

On Sun, May 1, 2011 at 10:56 PM, srushti <
reply@reply.github.com>wrote:

I'm closing this since we now have the ability to do what you want in a
more generic way. You can add environment_variables through goldberg_config,
which in your case would be "RAILS_ENV=test".
It looks like cc.rb does do this by default, but I'm still not sure we want
to be prescribing this.

Reply to this email directly or view it on GitHub:
#40 (comment)

@srushti
Copy link
Owner

srushti commented May 9, 2011

Yeah, fair enough. Just wondering if a ci server should enforce it, or expect the users to know what they're doing and do it themselves.

@professor
Copy link
Contributor Author

I guess the question is what user base do you want to attract. Do you only want to cater to build engineers, or do you want to also cater to software developers? The first group will be able to figure it out. The second group may not have much time to deal with assumptions made by goldberg. If goldberg is going to make assumptions, that's fine, but they should be more clearly articulated in the README file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants