You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classRestaurant < ActiveRecord::Base
...
acts_as_mappable:through=>:address
...
end
So when I try rubyRestaurant.find(1) the exception raised.
2.1.0 :001 > Restaurant.find(1)
Restaurant Load (12.4ms) SELECT `restaurants`.* FROM `restaurants` WHERE `restaurants`.`id` IN (1, '--- {}\n')
ActiveRecord::RecordNotFound: Couldn't find all Restaurants with 'id': (1, {}) (found 1 results, but was looking for 2)
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/finder_methods.rb:320:in `raise_record_not_found_exception!'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/finder_methods.rb:452:in `find_some'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/finder_methods.rb:416:in `find_with_ids'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/finder_methods.rb:68:in `find'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/activerecord-4.1.12/lib/active_record/querying.rb:3:in `find'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/geokit-rails-1.1.4/lib/geokit-rails/acts_as_mappable.rb:153:in `find'
from (irb):1
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/railties-4.1.12/lib/rails/commands/console.rb:90:in `start'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/railties-4.1.12/lib/rails/commands/console.rb:9:in `start'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/railties-4.1.12/lib/rails/commands/commands_tasks.rb:69:in `console'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/railties-4.1.12/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/drobazko/.rvm/gems/ruby-2.1.0/gems/railties-4.1.12/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:10:in `require'
from bin/rails:10:in `<main>'
The text was updated successfully, but these errors were encountered:
Hi, guys.
Seems to be the issue.
Rails 4.1.12
ruby 2.1.0
restaurant.rb
So when I try ruby
Restaurant.find(1)
the exception raised.The text was updated successfully, but these errors were encountered: