Hi all,
as I said in the subject.
My idea was to develop a website on my laptop using sqlite, and then
move into production on a different system afterwards, presumably
using MySQL. Is this feasible using rake and its friends?
Related, I was somewhat surprised to find out that the templates to
be stored in the database as well. That means you need to resort to
manual copy-paste to move templates between instances that look the
same but don’t share content or users.
The templating language looks wonderful, BTW. Great work!
--
Steven N. http://outerthought.org/
Outerthought Open Source Java & XML
stevenn at outerthought.org stevenn at apache.org
This is feasible as the schema setup in rails is db-agnostic.
Edit database.yml w/ sqlite driver
Generate your tables in sqlite
rake db:schema:dump
(this gives you schema.rb, move to production w/ database.yml w/
mysql driver)
rake db:schema:load
Of course, you could also just install MySQL on your laptop.
On 22 Sep 2006, at 15:20, Jon B. wrote:
This is feasible as the schema setup in rails is db-agnostic.
Edit database.yml w/ sqlite driver
Generate your tables in sqlite
rake db:schema:dump
(this gives you schema.rb, move to production w/ database.yml w/
mysql driver)
rake db:schema:load
OK - so now I have recreate tables on the production-side.
Now, since the templates are stored in the (development) DB, I assume
I will still have to recreate them on the production-side? And that
should still be done manually, no? What if I want to do this on a
regular basis: move setup/config, templates and content from
development → production (and even vice-versa, to test things out).
How would I need to work then?
(sorry for the dumb questions)
Also, I assume the difference between the instance and the
application mode is that the Rails rake stuff gets copied in or not.
So if I want to work with rake, I need to setup up a radiant instance
using the --unpack command.
Thanks for your help!
--
Steven N. http://outerthought.org/
Outerthought Open Source Java & XML
stevenn at outerthought.org stevenn at apache.org
Id really recommend looking @ this + spending a few days or good week
figuring it out …
http://rubyforge.org/projects/capistrano/
http://manuals.rubyonrails.com/read/book/17
While it may be overkill its worth learning since it is the “de-
facto” method of deployment in Rails applications. I myself have not
been in an environment where Ive needed it yet but there are many who
swear by it and Im sure it would make a RadiantCMS setup easier @
some point somewhere (db deployment/backup/etc).
The new version 1.2 has a pretty nifty command shell as well.
Sounds like you need a rake task that copies the schema and data from
development to production. There might be one on RailsWeenie, I’ll do
some
looking.
Sean C.
seancribbs.com