我正在使用Rails 2.3.16,Ruby 1.8.7
对于以下代码行,我得到如下错误:
代码:
ForeignScheduledItem.find(:all,
:conditions => { :foreign_scheduled_item =>
{ :scheduled_items => { :subscription_id => params[:subscription_id] } } },
:joins => :scheduled_item).each { |i| @subscriptions.push(Subscription.find_by_id(i.subscription_id)) }
错误:
ActiveRecord::StatementInvalid (ActiveRecord::StatementInvalid):
app/controllers/api/cache_controller.rb:47:in `expire_day_event_sets'
config/initializers/restfulx.rb:18:in `call'
config/initializers/restfulx.rb:38:in `call'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:162:in `start'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:95:in `start'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:92:in `each'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:92:in `start'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:23:in `start'
/home/ranjit/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/webrick/server.rb:82:in `start'
请你帮忙。