Ruby on Rails Sunday, September 10, 2017

Thanks for your reply,

I think I can work out most of the stuff but its the cloning the dev (db) into test that I cant work out.  Seem to remember it saying something in the ruby config  about the test database being re-writern from development (not sure how/when)

More comments in-line below.

On Sunday, September 10, 2017 at 6:05:04 PM UTC+1, Hassan Schroeder wrote:
On Sun, Sep 10, 2017 at 9:05 AM, Ben Edwards <lo...@funkytwig.com> wrote:
> 've been googling for this for a while wit little joy.  Maybe I'm using the
> wrong search terms but I'm very surprised there is not a howto guide;(,
>
> What I am trying to work out it how to take a project from development to
> test (and test) and then to production.  

Putting your app into production is usually called "deployment"; you
should be able to find lots of references to that, but most Rails apps
use Capistrano (highly recommended).
 
Thanks,  deployment yes, in terms of Capistrano will look into it but currently only have 5 pages and a lot of the data is loaded from outside rails (the load scripts already existed).  In time will look into it.  I feel better knowing how things work manually before going the automated route.

> Test
> I've seen in a few places that I can basically clone by rails development
> environment to test (including database).  I gather this means going to git
> test branch and running some type of rails command to do this (not sure what
> or what I need to setup).   All I can work out is I need to setup
> config/environments/test.rb/ & config/database.yml.

"git test branch"? What? Running tests has nothing to do with any
particular git branch. And ideally you'd be writing and running tests
continually throughout development.

Sorry 'git checkout test'.  I have develop, test and master branches.  When I am ready to test for a release I merge develop into test.  Cant see how I don't want to be in test branch for testing or am I doing this all wrong.
 
> Exporting config Data
> Bit more googling and I found out about 'rails db:seed:dump'
> (http://www.rubydoc.info/gems/seed_dump/0.5.3). So I guess I use something
> like
>
> rake db:seed:dump MODELS=User, RefValue

What are you calling "config data"? It's not usually something that's
associated with the DB.
 
There are a few tables, i.e. one tells the data load scripts which XML feeds to use to load data and other data to do with music venues.  I prefer doing this as data input forms as it  means I can access the data easily from rails (venue name, address, phone number) and validate data.  Its data feed configuration which is setup by admins. Think seeds.rb is the answer here.
 
Ben

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d706c6f4-2550-4c1f-a00e-a3f0ddaf8485%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment