garaio/xapian_db — Issue #15: beanstalk_worker.rake - Rails Environment Inclusion
Author: christophritler
Created: 2011-10-18 12:33:03+00:00
State: open

The rails environment should not be required directly in the beanstalk_worker.rake file.

beanstalk_worker.rake, line 8:

```ruby
require "#{Rails.root}/config/environment"
```

If done so, the rails environment will be loaded each time we use a rake task. Even if its not necessary.
And you need to remove this line if you are deploying an application for the first time (unless the database is already present).

The same task functionality could possibly be achieved by calling rails built-in environment rake task on top of the beanstalk_worker task.

beanstalk_worker.rake, line 16:

```ruby
task :beanstalk_worker => :environment do
```