Hi, We have a continuous integration server setup for our rails projects. I would like to set-up a different rails environment for running the tests on the build server so that I don''t have to force all the developers to set-up their local databases to match the build box''s connection information. However, when do something like: rake RAILS_ENV=build test:units It still tries to use the db connection information from the test environment. I think this must be hardcoded somewhere. Is there a way to get the test tasks to run with a different rails environment? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 25, 4:56 pm, byron appelt <byron.app...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It still tries to use the db connection information from the test > environment. I think this must be hardcoded somewhere. >Take a peak at the first line of test_helper.rb :-) Fred> Is there a way to get the test tasks to run with a different rails > environment?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 25, 10:56 am, byron appelt <byron.app...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > We have a continuous integration server setup for our rails projects. > I would like to set-up a different rails environment for running the > tests on the build server so that I don''t have to force all the > developers to set-up their local databases to match the build box''s > connection information. However, when do something like: > > rake RAILS_ENV=build test:units > > It still tries to use the db connection information from the test > environment. I think this must be hardcoded somewhere. > > Is there a way to get the test tasks to run with a different rails > environment?It would be better to not share the database.yml at all. That way, you can define what the "test" environment means for the ci server independently of the developers. I think it''s better practice to not store the database.yml in source control anyway, since it has passwords that you may not want to store in source control. Jeff -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Take a peak at the first line of test_helper.rb :-)I saw that, but it seems to not be the only place it is hardcoded since even with that line commented it tries to acees the test database. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.