# How to configure rforum with mailing lists

**URL:** <https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816>\
**Category:** Ruby-Forum\
**Created:** [May 27, 2006, 10:38pm UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816 "2006-05-27T22:38:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![croxmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@croxmeister](https://www.ruby-forum.com/u/croxmeister)\
**Post date:** [May 27, 2006, 10:38pm UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816/1 "2006-05-27T22:38:43Z")

</div>

I have installed rforum from SVN, but there doesn’t seem to be any way  
of linking it to mailing lists.

How is that part done?

---

<div class="post-metadata">

**Author:** ![croxmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@croxmeister](https://www.ruby-forum.com/u/croxmeister)\
**Post date:** [May 27, 2006, 11:47pm UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816/2 "2006-05-27T23:47:24Z")

</div>

Richard Church wrote:

I followed the instructions here  
[Linking a forum to a mailing list - Ruby-Forum - Ruby-Forum](http://www.ruby-forum.com/topic/52254#new) to configure mailing list  
connectivity.

However when I run it I get this error - it appears the script tries to  
use the development.rb file.

Is there some reason it should be required, or is it simply a bug from a  
development version?

/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:194:in  
`establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified) from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:185:in `establish\_connection’  
from  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:182:in  
`initialize_database' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:84:in `process’  
from  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in  
`send' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in `run’  
from ./script/…/config/environment.rb:12  
from ./script/process\_mails:11:in `require’  
from ./script/process\_mails:11

> I have installed rforum from SVN, but there doesn’t seem to be any way  
> of linking it to mailing lists.
> 
> How is that part done?

---

<div class="post-metadata">

**Author:** ![croxmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@croxmeister](https://www.ruby-forum.com/u/croxmeister)\
**Post date:** [May 28, 2006, 12:44am UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816/3 "2006-05-28T00:44:27Z")

</div>

Richard Church wrote:

After this I simply added a development section to database.yml to skip  
the error.

It turns out that :SearchLike creates this error where as :SearchFerret  
works correctly

Whether the result will be the same on the production database rather  
than the development database is something I can’t be sure off.

# output from process\_mails

Checking for new mails  
Reading last update time from last\_update.yaml…  
done.  
Updating index starting from Sat May 27 22:29:08 GMT 2006…  
./script/process\_mails:27:in `rebuild_index': wrong number of arguments (1 for 0) (ArgumentError) from ./script/process_mails:27:in`do\_update’  
from ./script/process\_mails:74  
from ./script/process\_mails:71:in `loop’  
from ./script/process\_mails:71

---

<div class="post-metadata">

**Author:** ![croxmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@croxmeister](https://www.ruby-forum.com/u/croxmeister)\
**Post date:** [May 28, 2006, 12:07pm UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816/4 "2006-05-28T12:07:28Z")

</div>

Richard Church wrote:

> Richard Church wrote:
> 
> After this I simply added a development section to database.yml to skip  
> the error.

You should switch to the production environment instead:

RAILS\_ENV=production ./script/process\_mails pathto/Maildir/cur 5

> ./script/process\_mails:27:in `rebuild\_index’: wrong number of arguments

That is a bug in the SVN version. Please comment out the call to  
rebuild\_index when you are using SearchLike.

---

<div class="post-metadata">

**Author:** ![croxmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@croxmeister](https://www.ruby-forum.com/u/croxmeister)\
**Post date:** [May 28, 2006, 2:25pm UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816/5 "2006-05-28T14:25:12Z")

</div>

Andreas S. wrote:

I began with the production version. I added the development section to  
database.yml because the process\_mail script referenced it and I wanted  
to see the outcome if the phase completed.

What should I do to prevent the development version from being  
referenced by the script? There has to be something in the configuration  
causing the development database to be referenced by the script.

Do you have some idea of where I should look?

> > Richard Church wrote:
> > 
> > After this I simply added a development section to database.yml to skip  
> > the error.
> 
> You should switch to the production environment instead:
> 
> RAILS\_ENV=production ./script/process\_mails pathto/Maildir/cur 5
> 
> > ./script/process\_mails:27:in `rebuild\_index’: wrong number of arguments
> 
> That is a bug in the SVN version. Please comment out the call to  
> rebuild\_index when you are using SearchLike.

---

<div class="post-metadata">

**Author:** ![croxmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@croxmeister](https://www.ruby-forum.com/u/croxmeister)\
**Post date:** [June 1, 2006, 9:10am UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816/6 "2006-06-01T09:10:27Z")

</div>

I had to set uncomment this setting in environment.rb to get it to work.  
The rforum is working on a Plesk domain and that could be the reason why

ENV[‘RAILS\_ENV’] = ‘production’

Andreas S. wrote:

> Richard Church wrote:
> 
> > What should I do to prevent the development version from being  
> > referenced by the script? There has to be something in the configuration  
> > causing the development database to be referenced by the script.
> 
> If you set the RAILS\_ENV to production, the script won’t reference the  
> development database:
> 
> > > RAILS\_ENV=production ./script/process\_mails pathto/Maildir/cur 5

---

<div class="post-metadata">

**Author:** ![croxmeister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@croxmeister](https://www.ruby-forum.com/u/croxmeister)\
**Post date:** [May 29, 2006, 12:09am UTC](https://www.ruby-forum.com/t/how-to-configure-rforum-with-mailing-lists/61816/7 "2006-05-29T00:09:30Z")

</div>

Richard Church wrote:

> What should I do to prevent the development version from being  
> referenced by the script? There has to be something in the configuration  
> causing the development database to be referenced by the script.

If you set the RAILS\_ENV to production, the script won’t reference the  
development database:

> > RAILS\_ENV=production ./script/process\_mails pathto/Maildir/cur 5
