# I'm confused

**URL:** <https://www.ruby-forum.com/t/im-confused/200205>\
**Category:** Radiant CMS\
**Created:** [December 7, 2010, 3:14am UTC](https://www.ruby-forum.com/t/im-confused/200205 "2010-12-07T03:14:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [December 7, 2010, 3:14am UTC](https://www.ruby-forum.com/t/im-confused/200205/1 "2010-12-07T03:14:52Z")

</div>

Hi All,

If I have a site with a number of extensions installed and I had to  
drop the database and want to reinitialise it what are the steps?

I’ve tried  
rake production db:bootstrap --trace

which fails due to missing columns that are part of various  
extensions.

I’ve tried  
rake production db:migrate

after to try and fix that, but the admin pages seem to disallow any  
activity that would change the database

Regards,

Marc

---

<div class="post-metadata">

**Author:** ![marc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@marc](https://www.ruby-forum.com/u/marc)\
**Post date:** [December 7, 2010, 3:24am UTC](https://www.ruby-forum.com/t/im-confused/200205/2 "2010-12-07T03:24:54Z")

</div>

On Mon, Dec 6, 2010 at 9:14 PM, Marc [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve tried  
> rake production db:migrate
> 
> after to try and fix that, but the admin pages seem to disallow any  
> activity that would change the database
> 
> Regards,
> 
> Marc

Here’s the short answer: move your extensions into a different  
directory, bootstrap, and then move them back and migrate the  
extensions

It probably depends on your extensions.  
Some are written blindly updating the existing models with assumptions  
that the database exits.  
An extension might add a column to the database and  
validate\_presence\_of for that column, for example.  
Some extensions might be fine, and others kill bootstrapping. So its  
easier to just bootstrap without any of them, and then add them back.

---

<div class="post-metadata">

**Author:** ![marc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@marc](https://www.ruby-forum.com/u/marc)\
**Post date:** [December 7, 2010, 3:46am UTC](https://www.ruby-forum.com/t/im-confused/200205/3 "2010-12-07T03:46:47Z")

</div>

Thanks Jim!

rake production db:migrate:extensions

didn’t seem to get the job done - I think there is a dependancy  
between some of the extensions (copy\_move, dashboard, page\_preview,  
paperclipped, ray, reorder, settings, sns, sns\_minifier). Funny enough  
if I do

foreach extension (\*) # in vendor/extensions  
(cd …/… ; rake radiant:extensions:${extension}:migrate)  
end

I get the right result.

I also did:

foreach extension (\*) # in vendor/extensions  
(cd …/… ; rake radiant:extensions:${extension}:update)  
end

just in case.

---

<div class="post-metadata">

**Author:** ![marc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@marc](https://www.ruby-forum.com/u/marc)\
**Post date:** [December 7, 2010, 3:53am UTC](https://www.ruby-forum.com/t/im-confused/200205/4 "2010-12-07T03:53:02Z")

</div>

On Mon, Dec 6, 2010 at 9:45 PM, Marc [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> (cd ../.. ; rake radiant:extensions:${extension}:migrate)  
> just in case.  
> You can setup the load order of extensions just like you can with  
> plugins in a regular rails project.  
> config.extensions = [:load\_me\_first, :some\_other, :all] # where all is  
> a placeholder for the unspecified

And there is also  
rake radiant:extensions:update\_all  
Which will also run update for extensions loaded as gems.
