# Extensions trouble in 0.6.7

**URL:** <https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322>\
**Category:** Radiant CMS\
**Created:** [June 2, 2008, 10:43pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322 "2008-06-02T22:43:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 2, 2008, 10:43pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/1 "2008-06-02T22:43:50Z")

</div>

Is anyone having trouble migrating extensions with the 0.6.7 release?  
After exporting the reorder extension I ran a migration and get this  
error:

```
  *******************************************************************
  * config.breakpoint_server has been deprecated and has no effect.

```

- 

```
*******************************************************************

```

rake aborted!  
uninitialized constant ApplicationController

I know that shards is now baked in but the readme of reorder says it  
needs shards installed to run, so just in case I installed shards and  
ran a db migration and get a similar error:

```
  *******************************************************************
  * config.breakpoint_server has been deprecated and has no effect.

```

- 

```
*******************************************************************

```

Could not load extension from file: shards\_extension.  
#\<NameError: uninitialized constant ShardsExtension\>  
rake aborted!  
uninitialized constant ApplicationController

Anyone else getting this and know how to resolve it? Any help would be  
appreciated guys!

shane

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 2, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/2 "2008-06-02T23:26:45Z")

</div>

Shane,

Try two things and then get back to us:

1. Run rake radiant:update to copy the new config files from the  
gem/vendor.
2. Remove :shards from config.extensions in config/environment.rb if it  
exists.

Sean

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 2, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/3 "2008-06-02T23:46:38Z")

</div>

Sean C. wrote:

> Shane,
> 
> Try two things and then get back to us:
> 
> 1. Run rake radiant:update to copy the new config files from the  
> gem/vendor.
> 2. Remove :shards from config.extensions in config/environment.rb if it  
> exists.
> 
> Sean

I’m assuming it’s okay to leave shards in the extensions folder while  
following your directions. Getting this:

```
  *******************************************************************
  * config.breakpoint_server has been deprecated and has no effect. 

```

- 

```
*******************************************************************

```

Could not load extension from file: shards\_extension.  
#\<NameError: uninitialized constant ShardsExtension\>  
rake aborted!  
uninitialized constant ApplicationController

shane

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 2, 2008, 11:56pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/4 "2008-06-02T23:56:10Z")

</div>

Shane,

Try removing all extensions from loading while doing this. Edit the  
appropriate line of config/environment.rb to read:

config.extensions = []

Also, comment out the line in config/environments/development.rb that  
starts ‘config.breakpoint\_server’

# config.breakpoint\_server = …

That will get rid of the warning. Then when those tasks have been run,  
restore your config.extensions line.

Sean

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 12:17am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/5 "2008-06-03T00:17:53Z")

</div>

HI,  
could be a similar problem to the one that i had with the reorder  
extension, because during my several try-outs i got same error  
messages.  
Probably the extension needs to have a reference to the app now, since  
shards is in there now.  
Something like:

require\_dependency ‘application’

But i have to say, i’m no ruby expert and i don’t know the guts of  
radiant.  
best,  
Jan

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 12:55am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/6 "2008-06-03T00:55:50Z")

</div>

Sean C. wrote:

> Shane,
> 
> Try removing all extensions from loading while doing this. Edit the  
> appropriate line of config/environment.rb to read:
> 
> config.extensions = []
> 
> Also, comment out the line in config/environments/development.rb that  
> starts ‘config.breakpoint\_server’
> 
> # config.breakpoint\_server = …
> 
> That will get rid of the warning. Then when those tasks have been run,  
> restore your config.extensions line.
> 
> Sean

I followed the directions… Side note, my environments.rb file had the  
config.extensions line already commented out but I continued on anyway  
with your suggestions? It looks like the migration worked but when I  
tried to start the server I got this error:

=\> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)  
=\> Rails application starting on [http://0.0.0.0:7000](http://0.0.0.0:7000)  
=\> Call with -d to detach  
=\> Ctrl-C to shutdown server  
\*\* Starting Mongrel listening at 0.0.0.0:7000  
\*\* Starting Rails with production environment…  
Could not load extension from file: shards\_extension.  
#\<NameError: uninitialized constant ShardsExtension\>  
Exiting  
/Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/activesupport/lib/active\_support/dependencies.rb:266:in  
`load_missing_constant': uninitialized constant ApplicationController (NameError) from /Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:453:in `const\_missing’  
from  
/Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/activesupport/lib/active\_support/dependencies.rb:465:in  
`const_missing' from /Library/Ruby/Gems/1.8/gems/radiant-0.6.7/app/controllers/admin/abstract_model_controller.rb:1 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require’  
from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:27:in `require' from /Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require’  
from  
/Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/activesupport/lib/active\_support/dependencies.rb:342:in  
`new_constants_in' from /Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require’  
… 50 levels…  
from  
/Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/railties/lib/commands/server.rb:39  
from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require’  
from script/server:3

It wasn’t really mentioned but since 0.6.7 has shards baked in do I  
still need shards installed to run reorder?

shane

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 1:08am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/7 "2008-06-03T01:08:51Z")

</div>

no, you don’t need shards, if you’re trying to (re-)install reorder,  
have a look at the other thread.  
j

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 1:09am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/8 "2008-06-03T01:09:31Z")

</div>

Sean,

Thanks for your patience. I’m not sure what I’m doing wrong. Here is  
what I’ve done:

- exported mailer and reorder to the /vendor/extensions/ folder
- commented out the config.extensions line in /config/environment.rb
- commented out the config.breakpoint\_server = true line in  
/config/environments/development.rb
- rake db:migrate:extensions and getting this error:

rake aborted!  
uninitialized constant ApplicationController

shane

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 12:59am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/9 "2008-06-03T00:59:28Z")

</div>

Shane,

No, please remove shards, it will break things.

Sean

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 1:10am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/10 "2008-06-03T01:10:28Z")

</div>

Sean,

I Forgot to mention that I removed shards from the extensions folder…

shane

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 3:01am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/11 "2008-06-03T03:01:17Z")

</div>

Shane,

Can you run the rake task with the --trace option and put the results in  
a pastie? ([http://pastie.org](http://pastie.org))

Sean

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 3:51am UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/12 "2008-06-03T03:51:21Z")

</div>

Sean,

Sure thing.

[http://pastie.org/207596](http://pastie.org/207596)

shane

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/13 "2008-06-03T17:59:48Z")

</div>

Shane,

The problem lies in a minor bug in the reorder extension. I’ll push up  
the change today to github.

Sean

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/14 "2008-06-03T18:18:15Z")

</div>

Shards in 0.6.7 ???

In my efforts to migrate I found this:  
[http://blog.leetsoft.com/2006/5/29/easy-migration-between-databases](http://blog.leetsoft.com/2006/5/29/easy-migration-between-databases)

But when I tried it I got

$ radiant -v  
Radiant 0.6.7  
$ rake production db:backup:write  
(in /home/anton/Ruby/Radiant)  
rake aborted!  
The Shards extension is required and must be loaded first!

What’s up?

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/15 "2008-06-03T21:06:32Z")

</div>

Benny D. said the following on 03/06/08 02:55 PM:

> your other extensions is still looking for it. Some extensions check for  
> the presence of the shards extension in their activate method, and raise  
> the error you pasted when they cannot find it.
> 
> Search for this line in your extensions, and comment it out;
> 
> raise “The Shards extension is required and must be loaded first!”  
> unless defined?(Shards)

Thanks.

It was in copy\_move.

–  
Results! Why, man, I have gotten a lot of results. I know several  
thousand things that won’t work.  
Thomas A. Edison

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/16 "2008-06-03T20:55:39Z")

</div>

> $ radiant -v  
> Radiant 0.6.7  
> $ rake production db:backup:write  
> (in /home/anton/Ruby/Radiant)  
> rake aborted!  
> The Shards extension is required and must be loaded first!

Anton,

Since 0.6.7, the shards extension is indeed no longer needed, but one of  
your other extensions is still looking for it. Some extensions check for  
the presence of the shards extension in their activate method, and raise  
the error you pasted when they cannot find it.

Search for this line in your extensions, and comment it out;

raise “The Shards extension is required and must be loaded first!”  
unless defined?(Shards)

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/17 "2008-06-03T21:09:31Z")

</div>

Note to developers –

Just like in Javascript, it’s better to test for the objects you need.  
This could have been obviated by testing for admin.page rather than  
Shards, which was just a module namespace for injected modifications.  
(Sorry to pick on you, Andrea)

Sean

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/18 "2008-06-03T21:49:03Z")

</div>

Sean,

Would you mind posting here when the revised reorder extension is  
available? And will the link still be?:

[http://svn.radiantcms.org/radiant/tags/rel\_0-6-7/extensions/reorder/](http://svn.radiantcms.org/radiant/tags/rel_0-6-7/extensions/reorder/)

Thanks again for all of your help and patience! I love Radiant and have  
used it on all my recent projects. Keep up the great work…

shane

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/19 "2008-06-03T21:10:43Z")

</div>

Benny D. said the following on 03/06/08 02:55 PM:

> your other extensions is still looking for it. Some extensions check for  
> the presence of the shards extension in their activate method, and raise  
> the error you pasted when they cannot find it.
> 
> Search for this line in your extensions, and comment it out;
> 
> raise “The Shards extension is required and must be loaded first!”  
> unless defined?(Shards)

I spoke too soon.

$ rake production db:backup:write  
(in /home/anton/Ruby/Radiant)  
Writing config…  
rake aborted!  
undefined method `find’ for Config:Module

–  
The great tragedy of Science - the slaying of a beautiful hypothesis by  
an ugly fact.  
Thomas H. Huxley

---

<div class="post-metadata">

**Author:** ![shanebo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@shanebo](https://www.ruby-forum.com/u/shanebo)\
**Post date:** [June 3, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322/20 "2008-06-03T21:57:32Z")

</div>

Shane,

The latest is on github, which we will be moving to permanently within  
the next month. We also have a solution in the works for the  
sub-projects/extensions issue.

$ git clone git://github.com/seancribbs/radiant.git  
$ cp -r radiant/extensions/reorder  
/path/to/your/project/vendor/extensions

Sean

[Next page](https://www.ruby-forum.com/t/extensions-trouble-in-0-6-7/139322.md?page=2)
