Comments (14)
I'm having the same error too!
from delayed_job_active_record.
I am also having the same issue and have verified that the error goes away when I remove "gem 'delayed_job_active_record'" from the Gemfile.
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
Rails 3.0.0
delayed_job (3.0.0)
delayed_job_active_record (0.3.1)
trace:
$script/rails generate delayed_job:active_record --trace
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:318:in retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished) from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in
retrieve_connection'
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in connection' from /usr/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/engines/sql/engine.rb:9:in
connection'
from /usr/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/engines/sql/relations/table.rb:37:in initialize' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/base.rb:850:in
new'
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/base.rb:850:in arel_table' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/base.rb:896:in
relation'
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/named_scope.rb:32:in scoped' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/base.rb:441:in
order'
from /usr/lib/ruby/gems/1.8/gems/delayed_job_active_record-0.3.1/lib/delayed/backend/active_record.rb:25
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in require' from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in load_dependency' from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in
new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in load_dependency' from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
require'
from /usr/lib/ruby/gems/1.8/gems/delayed_job_active_record-0.3.1/lib/delayed_job_active_record.rb:3
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in
require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in
require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in
require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler.rb:122:in require' from <RAILS_ROOT>/config/application.rb:6 from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/commands.rb:15:in
require'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/commands.rb:15
from script/rails:6:in `require'
from script/rails:6
from delayed_job_active_record.
Same issue here with delayed_job_active_record 0.3.2. (Rails 3.0.0 on ree.)
from delayed_job_active_record.
@nessence Which version of rails are you running?
from delayed_job_active_record.
@pcreux 3.0.0
from delayed_job_active_record.
Could this be related to rails/rails#783 ?
from delayed_job_active_record.
I'm having this problem too - has anyone solved this?
from delayed_job_active_record.
+1
from delayed_job_active_record.
This is an Rails 3 ActiveRecord problem as reported on this issue. To sum it up, AR tries to validate the scope at require time, which doesn't make any sense because there is no connection established yet.
The simple workaround is to define the scope inside a class method in order to delay it's validation to runtime. I'll submit a patch to solve this problem.
from delayed_job_active_record.
Is there a workaround for this issue we can use until a new gem is pushed? We're stuck on Rails 3.0.
from delayed_job_active_record.
@bryckbost is currently the only person who is authorized to push new delayed_job_active_record
gems. (If Brian adds me as an owner, I'd be happy to build and push a new release for you.) In the mean time, you can update your Gemfile to fetch delayed_job_active_record
from Git:
gem 'delayed_job_active_record', :git => 'git://github.com/collectiveidea/delayed_job_active_record.git'
from delayed_job_active_record.
This problem is still not fixed. @sferik's solution works though. however, replace it with the latest gem version breaks it
from delayed_job_active_record.
I'll push a new gem version this weekend.
from delayed_job_active_record.
Shiped it!
from delayed_job_active_record.
Related Issues (20)
- Rails 6.1.0.alpha support HOT 3
- `Delayed::Job` no longer defined in initializers HOT 16
- Delayed::DeserializationError: Job failed to load: undefined class/module Spree::AccountSalesRecordMailer.
- undefined method `table_name=` for Delayed::Backend::ActiveRecord::Job:Class HOT 1
- 4.1.5 breaking changes HOT 5
- A way to get the job ID inside a worker? HOT 2
- Error in 4.1.5 when upgrading Rails from 6.0 to 6.1 HOT 2
- Job running on 2 workers at once after timeout HOT 1
- Delayed job stops, the jobs are stuck in postgres HOT 6
- Rails 7 Support HOT 9
- Use case for locked_by in the ready_to_run query HOT 1
- Use `update` instead of `update_all` in the reserve_with_scope_using_optimized_mysql method.
- Do that destroy_failed_jobs get honored by delayed_job?
- Problem with DelayedJob Psych gem when upgrading to Ruby 2.7.5 HOT 2
- Rails 7 weird error: can't dump anonymous module HOT 3
- Can't create Delayed::Job record after `errors.add` in model HOT 1
- How does max_attempts interface with ActiveJob retry_on method?
- Deprecation warning in rails 7.1 HOT 1
- Need a new release to support rails 7.1
- Don't optimize mysql query with trilogy gem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delayed_job_active_record.