librelist archives

« back to archive

Problem starting the dev server when resque/tasks is in the rakefile

Problem starting the dev server when resque/tasks is in the rakefile

From:
Joshua Moore
Date:
2010-08-11 @ 13:42
Hi,

I am new to Resque and I am experiencing a weird problem.  When I require 
'resque/tasks' in the rake file I get this exception when I try to start 
the dev server.  However, when I execute 'rake environment resque:work' it
works fine.  Does anybody have any ideas on what might be going wrong?

Thanks,

Josh

WARNING: using the built-in Timeout class which is known to have issues 
when used for opening connections. Install the SystemTimer gem if you want
to make sure the Redis client will not hang.

/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/resque-1.9.9/lib/resque/tasks.rb:4:
undefined method `namespace' for main:Object (NoMethodError)
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
	from ./Rakefile:6
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load_without_new_constant_marking'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/whenever-0.4.2/lib/whenever.rb:5
	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:330:in `require'
	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:330:in `require'
	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:325:in `each'
	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:325:in `require'
	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:324:in `each'
	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:324:in `require'
	from ./script/../config/boot.rb:117:in `load_gems'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:164:in
`process'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:113:in
`send'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:113:in
`run'
	from /Users/jmoore/Documents/code/optimis/config/environment.rb:9
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/commands/server.rb:84
	from script/server:3:in `require'
	from script/server:3

Re: [resque] Problem starting the dev server when resque/tasks is in the rakefile

From:
Kunal Shah
Date:
2010-08-11 @ 14:12
What version of rake do you have installed? Also, install the SystemTimer 
gem as it asks you.

On Aug 11, 2010, at 9:42 AM, Joshua Moore wrote:

> Hi,
> 
> I am new to Resque and I am experiencing a weird problem.  When I 
require 'resque/tasks' in the rake file I get this exception when I try to
start the dev server.  However, when I execute 'rake environment 
resque:work' it works fine.  Does anybody have any ideas on what might be 
going wrong?
> 
> Thanks,
> 
> Josh
> 
> WARNING: using the built-in Timeout class which is known to have issues 
when used for opening connections. Install the SystemTimer gem if you want
to make sure the Redis client will not hang.
> 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/resque-1.9.9/lib/resque/tasks.rb:4:
undefined method `namespace' for main:Object (NoMethodError)
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
> 	from ./Rakefile:6
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load_without_new_constant_marking'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/whenever-0.4.2/lib/whenever.rb:5
> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:330:in
`require'
> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:330:in
`require'
> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:325:in `each'
> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:325:in
`require'
> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:324:in `each'
> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:324:in
`require'
> 	from ./script/../config/boot.rb:117:in `load_gems'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:164:in
`process'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:113:in
`send'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:113:in
`run'
> 	from /Users/jmoore/Documents/code/optimis/config/environment.rb:9
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/commands/server.rb:84
> 	from script/server:3:in `require'
> 	from script/server:3
> 

Re: [resque] Problem starting the dev server when resque/tasks is in the rakefile

From:
Joshua Moore
Date:
2010-08-13 @ 08:32
Thanks,  I figured out the problem.  I had require 'resque/tasks' before 
require 'rake'.  

Thanks again.

Josh


On Aug 11, 2010, at 10:12 PM, Kunal Shah wrote:

> What version of rake do you have installed? Also, install the 
SystemTimer gem as it asks you.
> 
> On Aug 11, 2010, at 9:42 AM, Joshua Moore wrote:
> 
>> Hi,
>> 
>> I am new to Resque and I am experiencing a weird problem.  When I 
require 'resque/tasks' in the rake file I get this exception when I try to
start the dev server.  However, when I execute 'rake environment 
resque:work' it works fine.  Does anybody have any ideas on what might be 
going wrong?
>> 
>> Thanks,
>> 
>> Josh
>> 
>> WARNING: using the built-in Timeout class which is known to have issues
when used for opening connections. Install the SystemTimer gem if you want
to make sure the Redis client will not hang.
>> 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/resque-1.9.9/lib/resque/tasks.rb:4:
undefined method `namespace' for main:Object (NoMethodError)
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
>> 	from ./Rakefile:6
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load_without_new_constant_marking'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in
`load'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/whenever-0.4.2/lib/whenever.rb:5
>> 	from 
/Users/jmoore/Documents/code/optimis/.bundle/environment.rb:330:in 
`require'
>> 	from 
/Users/jmoore/Documents/code/optimis/.bundle/environment.rb:330:in 
`require'
>> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:325:in `each'
>> 	from 
/Users/jmoore/Documents/code/optimis/.bundle/environment.rb:325:in 
`require'
>> 	from /Users/jmoore/Documents/code/optimis/.bundle/environment.rb:324:in `each'
>> 	from 
/Users/jmoore/Documents/code/optimis/.bundle/environment.rb:324:in 
`require'
>> 	from ./script/../config/boot.rb:117:in `load_gems'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:164:in
`process'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:113:in
`send'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/initializer.rb:113:in
`run'
>> 	from /Users/jmoore/Documents/code/optimis/config/environment.rb:9
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
>> 	from 
/Users/jmoore/.rvm/gems/ree-1.8.7-2010.02/gems/rails-2.3.5/lib/commands/server.rb:84
>> 	from script/server:3:in `require'
>> 	from script/server:3
>> 
>