Object doesn't support #inspect in rails 3.2.1

I migrate 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 console c = Campaign.first

I got the output but when I do

c.campaign_reports

I got

(Object doesn't support #inspect) =>

I m using rails 3.2.1 ruby ruby 1.9.2p290 gem 1.8.15 rvm 1.10.2

Please help me :frowning:

I migrate 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 console c = Campaign.first

I got the output but when I do

c.campaign_reports

I got

(Object doesn't support #inspect)

What happens if you do c.campaign_reports.first

Colin

I got the output but when I do

c.campaign_reports

I got

(Object doesn't support #inspect) =>

Update ruby to 1.9.3 (much more stable). Be sure you've updated Rails correctly (Gemset file and all configs). Update all gems you have and bundle it again.

If nothing happens, revise all third-party libs and plugins for incompatibilities.

Colin Law wrote in post #1048639:

Valery Kvon wrote in post #1048646:

I got the output but when I do

c.campaign_reports

I got

(Object doesn't support #inspect) =>

Update ruby to 1.9.3 (much more stable). Be sure you've updated Rails correctly (Gemset file and all configs). Update all gems you have and bundle it again.

If nothing happens, revise all third-party libs and plugins for incompatibilities.

Hi

I just create one new project and everything work fine there.

But in my migrate project console is not working properly. Following process I follow - 1) Create new rails application 2) shifting old code to new rails 3) all gems in Gemfile is updated 4) Using Restful authentication plugin for rails 3.2.1

What do you see when you do c=Campaign.first in the console, and what if you do cr=campaign_reports.first

I have to agree with Manish, it sounds like an gem not updated to correct version.

Colin

Colin Law wrote in post #1048648:

What I usually do when meet the problem like that. (Rails 3.2 - is a huge difference compared with 2.3, so, be patient. :slight_smile: 1) If it possible, i would to read the all error raising stuff to determine which part of code is the source of incompatibility. If there is no detailed information - it most likely the problem in some gem(s). 2) I would have switched off gems one by one and check the error again. Start with a gem, extending the ActiveRecord. If you found it - google to a solution. :slight_smile:

Rails is NOT MAGIC!

Is there a stack trace with the error? If so see if any clues there. Post it here if you can't see anything helpful.

Colin

what I found is this

/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

Well since I see that the last update to soap4r was in 2007 I think it unlikely that it supports rails 3 [1] Googling for soap4r rails 3 provided [2] which may be helpful. Did you not notice yourself that soap4r has not been updated for a long time?

[1] http://rubyforge.org/projects/soap4r/ [2] https://github.com/KarateCode/soap4r

Colin