This file contains 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
r.table("errors").filter( | |
{ | |
client_id: "1", | |
properties: {message: "Uncaught Error: Error calling method on NPObject."} | |
} | |
).filter(r.row("created_at").during(r.now().sub(24 * 60 * 60),r.now())); |
This file contains 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
Unfortunately, a fatal error has occurred. Please see the Bundler | |
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
/opt/jruby/bin/jruby extconf.rb | |
NotImplementedError: C extension support is not available | |
(root) at /opt/jruby/lib/ruby/shared/mkmf.rb:8 | |
require at org/jruby/RubyKernel.java:926 | |
(root) at /opt/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1 | |
require at /opt/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55 |
This file contains 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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.1.5' | |
# Use jdbcsqlite3 as the database for Active Record | |
gem 'activerecord-jdbcsqlite3-adapter' | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 4.0.3' | |
# Use Uglifier as compressor for JavaScript assets |
This file contains 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
01:53:59 {master} ~/yebo$ GEM_HOME=~/.gem/jruby jruby -S rake db:migrate | |
rake aborted! | |
NameError: undefined method 'ransack' for class '#<Class:0x9c9245>' | |
/home/thelinuxlich/.gem/jruby/gems/ransack-1.1.0/lib/ransack/adapters/active_record/base.rb:7:in `extended' | |
/home/thelinuxlich/.gem/jruby/gems/ransack-1.1.0/lib/ransack/adapters/active_record.rb:2:in `(root)' | |
/home/thelinuxlich/.gem/jruby/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:1:in `(root)' | |
/home/thelinuxlich/.gem/jruby/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require' | |
/home/thelinuxlich/.gem/jruby/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency' | |
/home/thelinuxlich/.gem/jruby/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require' | |
/home/thelinuxlich/.gem/jruby/gems/ransack-1.1.0/lib/ransack.rb:22:in `(root)' |
This file contains 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
LoadError: load error: /home/thelinuxlich/yebo/config/environment -- java.lang.ClassCastException: org.jruby.parser.LocalStaticScope cannot be cast to org.jruby.parser.IRStaticScope |
This file contains 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 Ransack | |
module Adapters | |
module ActiveRecord | |
module Base | |
def self.extended(base) | |
if !base.method_defined? :search | |
alias_method :search, :ransack | |
end | |
base.class_eval do |
This file contains 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
Rails.application.config.after_initialize do | |
ActiveRecord::Base.connection_pool.disconnect! | |
ActiveSupport.on_load(:active_record) do | |
config = ActiveRecord::Base.configurations[Rails.env] || | |
Rails.application.config.database_configuration[Rails.env] | |
puts config | |
config['reaping_frequency'] = 10 # seconds | |
ActiveRecord::Base.establish_connection(config) |
This file contains 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
threads 3, 3 | |
workers 2 | |
on_worker_boot do | |
require "active_record" | |
require "erb" | |
cwd = File.dirname(__FILE__)+"/.." | |
ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished | |
configuration = YAML.load(ERB.new(File.read("#{cwd}/config/database.yml")).result) | |
ActiveRecord::Base.establish_connection(configuration[ENV["RAILS_ENV"]]) |
This file contains 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
var r = require('rethinkdbdash')(); | |
setInterval(function() { | |
r.table("logs").insert({ | |
date: r.now() | |
}).run({noreply: true}) | |
, 1000) | |
r.table("logs").changes().run().then(function(feed) { |
This file contains 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
var field = ["properties","type"], | |
value = "event"; | |
// ... some query | |
.filter(function(row) { | |
var _row; | |
if(Array.isArray(field)) { | |
for(i = 0; i < field.length; i++) { | |
_row = row(field[i]); | |
} |