Skip to content

Instantly share code, notes, and snippets.

indexing index 'place_core'...
ERROR: index 'place_core': sql_range_query: Column 'context' in on clause is amb
iguous (DSN=mysql://root:***@localhost:3306/planet).
total 0 docs, 0 bytes
total 0.064 sec, 0.00 bytes/sec, 0.00 docs/sec
distributed index 'place' can not be directly indexed; skipping.
points = [[0,0],[4,2],[3,3],[2,4],[6,6],[8,3]] # это как раз твои точки из exact
x_min_max = points.minmax { |a, b| a[0] <=> b[0] }
y_min_max = points.minmax { |a, b| a[1] <=> b[1] } # тут была ошибка
left_bottom_point = [x_min_max[0][0], y_min_max[0][1]]
top_right_point = [x_min_max[1][0], y_min_max[1][1]]
mobot:ruby-stemmer yury$ rvm system
mobot:ruby-stemmer yury$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
mobot:ruby-stemmer yury$ ruby extconf.rb
cc -Iinclude -fPIC -c -o src_c/stem_ISO_8859_1_danish.o src_c/stem_ISO_8859_1_danish.c
cc -Iinclude -fPIC -c -o src_c/stem_UTF_8_danish.o src_c/stem_UTF_8_danish.c
cc -Iinclude -fPIC -c -o src_c/stem_ISO_8859_1_dutch.o src_c/stem_ISO_8859_1_dutch.c
cc -Iinclude -fPIC -c -o src_c/stem_UTF_8_dutch.o src_c/stem_UTF_8_dutch.c
cc -Iinclude -fPIC -c -o src_c/stem_ISO_8859_1_english.o src_c/stem_ISO_8859_1_english.c
cc -Iinclude -fPIC -c -o src_c/stem_UTF_8_english.o src_c/stem_UTF_8_english.c
<system.serviceModel>
<bindings>
<webHttpBinding/>
</bindings>
<services>
<service behaviorConfiguration="Order.API.ServiceBehavior" name="Order.API.OrderService">
<endpoint binding="webHttpBinding" behaviorConfiguration="webBehavior" contract="Order.API.IOrderService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
require 'erubis/helpers/rails_helper'
class FixedErubis < ::Erubis::Eruby
def add_preamble(src)
src << "@output_buffer = '';\n"
end
def add_text(src, text)
src << "@output_buffer << '" << escape_text(text) << "';"
end
module Fx
class UnicodeEnforcer
def initialize(app)
@app = app
end
def call(env)
req = Rack::Request.new(env)
force_encoding(req.params)
mobot:TestApp yury$ bundle install
Updating git://github.com/Manfred/unichars.git
Fetching source index from http://gemcutter.org/
Resolving dependencies
Updating git://github.com/Manfred/unichars.git
Installing rake (0.8.7) from system gems
Installing rails (2.3.5) from system gems
Installing unichars (0.5) from git://github.com/Manfred/unichars.git (at master) with native extensions
Installing activeresource (2.3.5) from system gems
Installing actionmailer (2.3.5) from system gems
** Erubis 2.6.5
Processing HomeController#index (for 91.192.32.186 at 2010-03-12 15:50:29) [GET]
Parameters: {"controller"=>"home", "action"=>"index"}
Rendering template within layouts/home
Rendering home/index
ActionView::TemplateError (invalid byte sequence in US-ASCII) in app/views/home/index.html.erb:
#!/usr/bin/env bash
if [[ -s /usr/local/rvm/scripts/rvm ]] ; then source /usr/local/rvm/scripts/rvm ; fi
FILE_NAME=`basename $0`
if [ "`echo $0 | cut -c1`" = "/" ]; then
RAILS_BIN=`dirname $0`
else
RAILS_BIN=`pwd`/`echo $0 | sed -e s/$FILE_NAME//`
fi
/Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/mysql2-0.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:244:in `close': already closed MySQL connection (Mysql2::Error)
from /Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/mysql2-0.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:244:in `disconnect!'
from /Users/yury/Work/planet33/sources/web2/config/unicorn.rb:40:in `block in reload'
from /Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/unicorn-0.97.0/lib/unicorn.rb:592:in `call'
from /Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/unicorn-0.97.0/lib/unicorn.rb:592:in `block in spawn_missing_workers'
from /Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/unicorn-0.97.0/lib/unicorn.rb:589:in `each'
from /Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/unicorn-0.97.0/lib/unicorn.rb:589:in `spawn_missing_workers'
from /Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/unicorn-0.97.0/lib/unicorn.rb:603:in `maintain_worker_count'
from /Users/yury/.rvm/gems/ruby-1.9.1-p378/gems/unicorn-0.97.0/lib/unicorn.rb:270:in `start'
fr