Search Results

Search found 565 results on 23 pages for 'trip'.

Page 5/23 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • What might be causing this Rails method error?

    - by Trip
    My error: Notice the undefined method '-@' . This is for a sort by. All sorts on one page break, but all the sorts on other pages use the same helper and do not break. Does it allude to something obvious? Processing OrganizationsController#search (for ::1 at 2010-05-13 15:42:01) [GET] Parameters: {"action"=>"search", "controller"=>"organizations", "direction"=>"desc", "_"=>"1273779721464", "order_by"=>"published_at"} SQL (0.5ms) SHOW TABLES Organization Columns (2.2ms) SHOW FIELDS FROM `organizations` NoMethodError (undefined method `-@' for #<Array:0x2f88cc8>): app/controllers/organizations_controller.rb:190:in `search' sunspot (1.0.5) lib/sunspot/util.rb:84:in `call' sunspot (1.0.5) lib/sunspot/util.rb:84:in `instance_eval_or_call' sunspot (1.0.5) lib/sunspot/search.rb:200:in `build' sunspot (1.0.5) lib/sunspot/session.rb:45:in `new_search' sunspot (1.0.5) lib/sunspot/session.rb:53:in `search' sunspot (1.0.5) lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `search' sunspot (1.0.5) lib/sunspot.rb:323:in `search' app/controllers/organizations_controller.rb:183:in `search' haml (2.2.2) [v] rails/./lib/sass/plugin/rails.rb:19:in `process' lib/flash_session_cookie_middleware.rb:14:in `call' vendor/gems/hoptoad_notifier-2.2.2/lib/hoptoad_notifier/rack.rb:27:in `call' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' Rendered rescues/_trace (68.5ms) Rendered rescues/_request_and_response (0.6ms) Rendering rescues/layout (internal_server_error)

    Read the article

  • What video encoder services do you use with s3?

    - by Trip
    We were using FFmpeg which is free. And when a bug occurred that broke the system, a previous developer installed PandaStream. My question is, what do you recommend for quality video encoders? Is it best to stick with ffmpeg and keep it free, or does a small website really need a heavy duty service like Panda?

    Read the article

  • I am validating for RegEx errors -- how can I return which keyword, it failed on?

    - by Trip
    I'm passing new objects through this set of regex : (?i)exp\s|(?i)expire\s|(?i)print|(?i)mention|(?i)spring|(?i)summer|(?i)winter|(?i)jan(\s|\.)|(?i)january|(?i)february|(?i)feb(\.|\s)|(?i)march|mar(\.|\s)|(?i)april|(?i)june|(?i)july|(?i)august|(?i)aug(\s|\.)|(?i)september|(?i)sept(\.|\s)|(?i)november|(?i)nov(\.|\s)|(?i)december|(?i)dec(\.|\s)|(?i)holiday|(?i)christmas|(?i)holloween|(?i)easter|(?i)season|(?i)ends|(?i)end If it errors, for example on the word christmas , how can I dynamically pull the word it errors on, and display it as the cause of the error?

    Read the article

  • Setting up restful routes as a total newb

    - by Trip
    I'm getting the following error: Unknown action No action responded to show. Actions: activate, destroy, index, org_deals, search, and suspend Controller: class Admin::HomepagesController < Admin::ApplicationController def org_deals @organization = Organization.find(:all) end Routes: admin.resources :organizations, :collection => {:search => :get}, :member => {:suspend => :get, :activate => :get} To note: This is a controller inside of a controller. Any ideas why this is?

    Read the article

  • Delayed Jobs is not finding Records and failing..

    - by Trip
    In my app, delayed jobs isn't running automatically on my server anymore. It used to.. When I manually ssh in, and perform rake jobs:work I return this : * Starting job worker host:ip-(censored) pid:21458 * [Worker(host:ip-(censored) pid:21458)] acquired lock on PhotoJob * [JOB] host:ip-(censored) pid:21458 failed with ActiveRecord::RecordNotFound: Couldn't find Photo with ID=9237 - 4 failed attempts This returns roughly 20 times over for what I think is several jobs. Then I get a few of these: [Worker(host:ip-(censored) pid:21458)] failed to acquire exclusive lock for PhotoJob And then finally one of these : 12 jobs processed at 73.6807 j/s, 12 failed ... Any ideas what I should be mulling over? Thanks so much!

    Read the article

  • Can using Chronic impair your sense of time?

    - by Trip
    Haha.. I'm using Chronic to parse the time users add in the Calendar. Where the code works and implements the right time, the end result is that, IF a user adds a time, then it has no date, and because it has no date, it will not show in results. Any ideas? def set_dates unless self.natural_date.blank? || Chronic.parse(self.natural_date).blank? # check if we are dealing with a date or a date + time if time_provided?(self.natural_date) self.date = nil self.time = Chronic.parse(self.natural_date) else self.date = Chronic.parse(self.natural_date).to_date self.time = nil end end unless self.natural_end_date.blank? || Chronic.parse(self.natural_end_date).blank? # check if we are dealing with a date or a date + time if time_provided?(self.natural_end_date) self.end_date = nil self.end_time = Chronic.parse(self.natural_end_date) else self.end_date = Chronic.parse(self.natural_end_date).to_date self.end_time = nil end end end Edit: Here is the time_provided? method: def time_provided?(natural_date_string) date_span = Chronic.parse(natural_date_string, :guess => false) (date_span.last - date_span.first).to_i == 1 end

    Read the article

  • How does Facebook codes their Cropping tool?

    - by Trip
    I ask this because I am currently trying to work out my own technique, and there are huge strategic hangups for the entire site when your begin this. Of them are: Using jCrop and rMagick, it takes up a huge amount of processing ( to which I have backgrounded ). Because I have it backgrounded, I must by ajax develop a feature that auto-updates every five seconds to check when the backgrounding is done. Has anyone accomplished this with their sites? If so, what are some creative techniques you came across to keep the processing streamline, and the users happy?

    Read the article

  • Can using Chronic impair you sense of time?

    - by Trip
    Haha.. I'm using Chronic to parse the time users add in the Calendar. Where the code works and implements the right time, the end result is that, IF a user adds a time, then it has no date, and because it has no date, it will not show in results. Any ideas? def set_dates unless self.natural_date.blank? || Chronic.parse(self.natural_date).blank? # check if we are dealing with a date or a date + time if time_provided?(self.natural_date) self.date = nil self.time = Chronic.parse(self.natural_date) else self.date = Chronic.parse(self.natural_date).to_date self.time = nil end end unless self.natural_end_date.blank? || Chronic.parse(self.natural_end_date).blank? # check if we are dealing with a date or a date + time if time_provided?(self.natural_end_date) self.end_date = nil self.end_time = Chronic.parse(self.natural_end_date) else self.end_date = Chronic.parse(self.natural_end_date).to_date self.end_time = nil end end end

    Read the article

  • Paperclip not running tasks but not showing errors

    - by Trip
    This is strange. I just did a deploy to a cluster server, and since then, pictures have not been processing. Reading the logs, I usually do not get an error at all, but they never finish. However, on one particular image, I found this little bit at least, but this might not explain everything.. Any ideas? Processing PhotosController#edit (for 69.248.152.173 at 2010-05-27 04:25:12) [GET] Parameters: {"gallery_id"="2102", "action"="edit", "type"="photo", "id"="15453", "crop"="true", "controller"="photos", "organization_id"="470", "_"="1274959512393"} Rendering media/crop_photo ActionView::TemplateError (/data/HQ_Channel/releases/20100524111501/public/system/photos/15453/original/DSC05193.JPG is not recognized by the 'identify' command.) on line #4 of app/views/media/crop_photo.js.haml: 1: == $("#media_header").html('#{ escape_javascript(render :partial = 'media/crop_photo') }').slideDown("slow"); 2: 3: :plain 4: function updateForm(coords) 5: { 6: var rx = #{PHOTO_IMAGE_WIDTH} / coords.w; 7: var ry = #{PHOTO_IMAGE_HEIGHT} / coords.h; vendor/gems/thoughtbot-paperclip-2.3.1/lib/paperclip/geometry.rb:24:in `from_file' app/models/photo.rb:68:in `photo_geometry' app/views/media/crop_photo.js.haml:4:in `_run_haml_app47views47media47crop_photo46js46haml' haml (2.2.2) [v] lib/haml/helpers/action_view_mods.rb:13:in `render' app/controllers/photos_controller.rb:81:in `crop' app/controllers/photos_controller.rb:24:in `edit' haml (2.2.2) [v] rails/./lib/sass/plugin/rails.rb:19:in `process' lib/flash_session_cookie_middleware.rb:14:in `call' vendor/gems/hoptoad_notifier-2.2.2/lib/hoptoad_notifier/rack.rb:27:in `call' ** [Hoptoad] Failure: Net::HTTPClientError ** [Hoptoad] Environment Info: [Ruby: 1.8.6] [Rails: 2.3.3] [Env: production] ** [Hoptoad] Response from Hoptoad: No project exists with the given API key. Rendering /data/HQ_Channel/releases/20100524111501/public/500.html (500 Internal Server Error) And then a little later, I got this : ActionView::TemplateError (/data/HQ_Channel/releases/20100524111501/public/system/photos/15453/original/DSC05193.JPG is not recognized by the 'identify' command.) on line #4 of app/views/media/crop_photo.js.haml: 1: == $("#media_header").html('#{ escape_javascript(render :partial = 'media/crop_photo') }').slideDown("slow"); 2: 3: :plain 4: function updateForm(coords) 5: { 6: var rx = #{PHOTO_IMAGE_WIDTH} / coords.w; 7: var ry = #{PHOTO_IMAGE_HEIGHT} / coords.h; vendor/gems/thoughtbot-paperclip-2.3.1/lib/paperclip/geometry.rb:24:in `from_file' app/models/photo.rb:68:in `photo_geometry' app/views/media/crop_photo.js.haml:4:in `_run_haml_app47views47media47crop_photo46js46haml' haml (2.2.2) [v] lib/haml/helpers/action_view_mods.rb:13:in `render' app/controllers/photos_controller.rb:81:in `crop' app/controllers/photos_controller.rb:24:in `edit' haml (2.2.2) [v] rails/./lib/sass/plugin/rails.rb:19:in `process' lib/flash_session_cookie_middleware.rb:14:in `call' vendor/gems/hoptoad_notifier-2.2.2/lib/hoptoad_notifier/rack.rb:27:in `call' ** [Hoptoad] Failure: Net::HTTPClientError ** [Hoptoad] Environment Info: [Ruby: 1.8.6] [Rails: 2.3.3] [Env: production] ** [Hoptoad] Response from Hoptoad: No project exists with the given API key. Rendering /data/HQ_Channel/releases/20100524111501/public/500.html (500 Internal Server Error)

    Read the article

  • Most proper way to use inherited classes with shared scopes in Mongo?

    - by Trip
    I have the TestVisual class that is inherited by the Game class : class TestVisual < Game include MongoMapper::Document end class Game include MongoMapper::Document belongs_to :maestra key :incorrect, Integer key :correct, Integer key :time_to_complete, Integer key :maestra_id, ObjectId timestamps! end As you can see it belongs to Maestra. So I can do Maestra.first.games But I can not to Maestra.first.test_visuals Since I'm working specifically with TestVisuals, that is ideally what I would like to pull. Is this possible with Mongo. If it isn't or if it isn't necessary, is there any other better way to reach the TestVisual object from Maestra and still have it inherit Game ?

    Read the article

  • Writing a simple incrementer counter in rails

    - by Trip
    For every Card, I would like to attach a special number to them that increments by one. I assume I can do this all in the controller. def create @card = Card.new(params[:card]) @card.SpecNum = @card.SpecNum ++ ... end Or. I can be blatantly retarded. And maybe the best bet is to add an auto-incremement table to mysql. The problem is the number has to start at a specific number, 1020. Any ideas?

    Read the article

  • Z-index bug with IE6.. can't seem to figure this one out

    - by Trip
    I am working on this gorgeous header here at : http://kayaskitchenbelmar.com/test/header.html Unfortunately, in IE6, the drop downs that come off of the Print and View buttons collapse on to a new line. This is because of the common z-index bug. I tried resolving this by making the parent div have a higher z-index and position relative with its child a lower z-index and position absolute, but that didn't seem to work. Possibly I'm missing something obvious? Thanks so much

    Read the article

  • Trying to get paperclip to refresh or reprocess..

    - by Trip
    I have over time, changed the size for thumbs of the class Deal. Through these changes, users were uploading to the site, so there are few people who have different sized thumbs. I wanted to reprocress or refresh these, so I went to into my root and typed: $ rake paperclip:refresh class=Deal Did nothing for the thumb sizes.. Then I : irb Deal.find(987).reprocess! Returned this : NoMethodError: undefined method `reprocess!' for #<Deal:0xb68a0988> from /data/HQ_Channel/releases/20100607130346/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:260:in `method_missing' from (irb):7 My deal class is this : => Deal(id: integer, organization_id: integer, deal: string, value: string, what: string, description: string, image_file_name: string, image_content_type: string, image_file_size: integer, image_updated_at: datetime, created_at: datetime, updated_at: datetime, deal_image_file_name: string, deal_image_content_type: string, deal_image_file_size: integer, deal_image_uploaded_at: datetime) What can i do to have it reprocess the original to make the thumb the correct size in the current thumb size params?

    Read the article

  • Accessing global variables in a flash[:notice]

    - by Trip
    This is deals_controller.rb. And it works like this, except two things. Not sure how to call Deal.count to add in my flash[:notice] . I get the hunch that its not calling something global. I need that contional statement back, as I'm pretty sure its responsible for actually adding the new @deal . So I assume my syntax is off. Do note, I added an extra 'end' when I uncomment this block. def create -# This will use the disclaimer_ids submitted from the check boxes in the view -# to add/delete deal.disclaimers entries to matched the list of checked boxes. @deal = Deal.new(params[:deal]) -# <------I Need this commented out IF statement back ------- -#if @deal.valid? && @organization.deals << @deal flash[:notice] = 'Your promotion is published! You may find it in the number 1 position of our #{deal.count} previously posted promotions. To see your promotion, click here."' respond_to do |format| format.html { redirect_to organization_deals_path(@organization) } format.js -# I Need this IF Statement Back! -#else -#@disclaimers = Disclaimer.all -#render :action = 'new' end end Thanks!

    Read the article

  • Removing &NBSP; in Rails

    - by Trip
    I am trying to remove all &nbsp;'s in my model with the following method : def about_us_sans_spaces self.about_us = replace(self.about_us, "&nbsp;", " ") end Except! it turns out 'replace' isn't a method in rails. How would you remove the  s? Mind you, I have already tried sanitized, simple_format. My view looks like this right now: = truncate(sanitize(simple_format(organization.about_us_sans_spaces), :tags => ''), 125).titleize

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >