This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rm -rf ~/.bundle/ ~/.gem/ .bundle/ Gemfile.lock | |
| bundle install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Location.search {with(:coordinates).near(42.331527,-83.075953)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NoMethodError: undefined method 'coordinates' for <Sunspot::DSL::Fields:...> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Location < ActiveRecord::Base | |
| searchable do | |
| location :coordinates | |
| end | |
| def coordinates | |
| Sunspot::Util::Coordinates.new(self.lat,self.lng) | |
| end | |
| def coordinates=(sunspot_util_coordinates) | |
| self.lat,self.lng = [sunspot_util_coordinates.lat, sunspot_util_coordinates.lng] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -----> Heroku receiving push | |
| -----> Rails app detected | |
| -----> Detected Rails is not set to serve static_assets | |
| Installing rails3_serve_static_assets... done | |
| -----> Gemfile detected, running Bundler version 1.0.0 | |
| Unresolved dependencies detected; Installing... | |
| /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error) | |
| from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `new' | |
| from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize' | |
| from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:63:in `each' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ActiveRecord | |
| class Base | |
| def self.merge_conditions(*conditions) | |
| segments = [] | |
| conditions.each do |condition| | |
| unless condition.blank? | |
| sql = sanitize_sql(condition) | |
| segments << sql unless sql.blank? | |
| end |
NewerOlder