Rails 3.2.1 中的对象不支持#inspect

发布于 2025-01-08 09:57:13 字数 391 浏览 3 评论 0原文

我将我的应用程序从 Rails 2.3.11 迁移到 Rails 3.2.1

我的模型

class Campaign < ActiveRecord::Base
  has_many :campaign_reports
end


class CampaignReport < ActiveRecord::Base
  belongs_to :campaign
end

在控制台中,我得到了输出,但是当我这样做时,

c = Campaign.first
c.campaign_reports

我得到了

(对象不支持#inspect)

I migrated my application from rails 2.3.11 to rails 3.2.1

My models

class Campaign < ActiveRecord::Base
  has_many :campaign_reports
end


class CampaignReport < ActiveRecord::Base
  belongs_to :campaign
end

In the console, I got the output but when I do

c = Campaign.first
c.campaign_reports

I get

(Object doesn't support #inspect)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

兲鉂ぱ嘚淚 2025-01-15 09:57:13

我发现的是

/home/manish/.rvm/gems/ruby-1.9.2-p290/gems/soap4r-1.5.8/lib/soap/property.rb:68: warning: encoding option is ignored - u
/home/manish/.rvm/gems/ruby-1.9.2-p290/gems/soap4r-1.5.8/lib/soap/property.rb:69: warning: encoding option is ignored - u
/home/manish/.rvm/gems/ruby-1.9.2-p290/gems/soap4r-1.5.8/lib/soap/property.rb:70: warning: encoding option is ignored - u

what I found is

/home/manish/.rvm/gems/ruby-1.9.2-p290/gems/soap4r-1.5.8/lib/soap/property.rb:68: warning: encoding option is ignored - u
/home/manish/.rvm/gems/ruby-1.9.2-p290/gems/soap4r-1.5.8/lib/soap/property.rb:69: warning: encoding option is ignored - u
/home/manish/.rvm/gems/ruby-1.9.2-p290/gems/soap4r-1.5.8/lib/soap/property.rb:70: warning: encoding option is ignored - u
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文