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 :(

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Colin Law at Feb 24, 2012 at 1:33 pm

    On 24 February 2012 13:27, Manish N. wrote:
    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 m using
    rails 3.2.1
    ruby ruby 1.9.2p290
    gem 1.8.15
    rvm 1.10.2
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Manish N. at Feb 24, 2012 at 1:44 pm

    Colin Law wrote in post #1048639:
    On 24 February 2012 13:27, Manish N. wrote:
    end
    (Object doesn't support #inspect)
    What happens if you do c.campaign_reports.first

    Colin
    If I do
    c.campaign_reports.first

    I got error
    NoMethodError: undefined method `zero?' for :+:Symbol

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Feb 24, 2012 at 2:06 pm

    On 24 February 2012 13:43, Manish N. wrote:
    Colin Law wrote in post #1048639:
    On 24 February 2012 13:27, Manish N. wrote:
    end
    (Object doesn't support #inspect)
    What happens if you do c.campaign_reports.first

    Colin
    If I do
    c.campaign_reports.first

    I got error
    NoMethodError: undefined method `zero?' for :+:Symbol
    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

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Manish Nautiyal at Feb 24, 2012 at 2:08 pm

    Colin Law wrote in post #1048648:
    On 24 February 2012 13:43, Manish N. wrote:

    I got error
    NoMethodError: undefined method `zero?' for :+:Symbol
    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
    How can I find which gem is not updated to correct version?

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Feb 24, 2012 at 2:28 pm

    On 24 February 2012 14:08, Manish Nautiyal wrote:
    Colin Law wrote in post #1048648:
    On 24 February 2012 13:43, Manish N. wrote:

    I got error
    NoMethodError: undefined method `zero?' for :+:Symbol
    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
    How can I find which gem is not updated to correct version?
    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

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Valery Kvon at Feb 24, 2012 at 1:43 pm

    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.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Manish Nautiyal at Feb 24, 2012 at 2:02 pm

    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

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Valery Kvon at Feb 24, 2012 at 2:19 pm

    On 24.02.2012, at 18:02, Manish Nautiyal wrote:

    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 I usually do when meet the problem like that. (Rails 3.2 - is a huge difference compared with 2.3, so, be patient. :)
    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. :)

    Rails is NOT MAGIC!

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Manish Nautiyal at Feb 25, 2012 at 5:30 am
    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

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Feb 25, 2012 at 9:15 am

    On 25 February 2012 05:30, Manish Nautiyal wrote:
    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
    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

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 24, '12 at 1:28p
activeFeb 25, '12 at 9:15a
posts11
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase