I've not kept up with migrations, as we have to use a different method here. You definitely want to fix your migrations, though. Priorities, priorities...
On Dec 31, 9:11 am, RubyonRails_newbie <craigwest...@googlemail.com> wrote: > Yeah good spot. > > I avoided rake db:migrate because of my error posted yesterday that > returned: > rake aborted! > undefined method `reenable' for <Rake::Task db:schema:dump => > [environment]>:Rake::Task > > So I understand your reply, but I don't know how to fix it... Is there > a solution besides manually adding in the additional columns myself? > > On Dec 31, 3:04 pm, Student <blog...@pierian-spring.net> wrote: > > > I'm going to go out on a limb & say that you did not perform your > > migrations in the production environment. The find_by* methods are > > dynamically generated. No find_by_user_id method => no user_id > > column. > > > On Dec 31, 8:36 am, RubyonRails_newbie <craigwest...@googlemail.com> > > wrote: > > > > Hi all, > > > > Thankfully, my site is now live. It needs some tweaks, but most > > > importantly I need to fix the 500 internal server error I seem to be > > > getting. > > > > We're sorry, but something went wrong(500), We've been notified about > > > this issue and we'll take a look at it shortly. > > > > When I look at the log, it says: > > > > NoMethodError (undefined method `find_by_user_id' for #<Class: > > > 0xb5f1b188>): > > > app/controllers/user_controller.rb:32:in `index' > > > /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in > > > `process_request' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb: > > > 207:in `main_loop' > > > /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb: > > > 385:in `start_request_handler' > > > /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb: > > > 343:in `handle_spawn_application' > > > /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork' > > > /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb: > > > 341:in `handle_spawn_application' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in > > > `__send__' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in > > > `main_loop' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in > > > `start_synchronously' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in > > > `start' > > > /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb: > > > 209:in `start' > > > /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in > > > `spawn_rails_application' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb: > > > 126:in `lookup_or_add' > > > /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in > > > `spawn_rails_application' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb: > > > 80:in `synchronize' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb: > > > 79:in `synchronize' > > > /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in > > > `spawn_rails_application' > > > /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in > > > `spawn_application' > > > /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in > > > `handle_spawn_application' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in > > > `__send__' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in > > > `main_loop' > > > /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in > > > `start_synchronously' > > > /usr/lib/phusion_passenger/passenger-spawn-server:61 > > > > So - the undefined method `find_by_user_id line in the user_controller > > > says: > > > @posts = Post.find_by_user.id( @user.id, 1, :limit => 1, :conditions > > > => "active_post = 1", :order => "created_at desc") > > > > THis worked perfectly fine in development, so I dont understand why it > > > hasn't rendered the page as it did in prod. > > > > Has anyone else come across this issue before? If so - how/what do I > > > need to do to resolve it? > > > > Many, many thanks (happy new year too!!) :-) > > > > :-) -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.