Skip to content

Instantly share code, notes, and snippets.

# Primer idea
class Transcription < ActiveResource::Base
self.site = TRANSCRIPTIONS_CONFIG['site_url']
self.element_name = "transcription"
# Hacemos un módulo que haga toda la magia por detrás
# es fácil de hacer.
:has_one => :result
gramos@marlasina:~/src-new/delayed_job(master)]$ rake spec
(in /home/gramos/src-new/delayed_job)
/home/gramos/.rvm/gems/ruby-1.9.1-p378/gems/jeweler-1.4.0/lib/jeweler/commands/check_dependencies.rb:13:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
All dependencies seem to be installed.
/home/gramos/.rvm/rubies/ruby-1.9.1-p378/bin/ruby -I"lib:lib" "/home/gramos/.rvm/gems/ruby-1.9.1-p378/gems/rspec-1.3.0/bin/spec" "spec/worker_spec.rb" "spec/message_sending_spec.rb" "spec/performable_method_spec.rb"
**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance.
You can install the extension as follows:
gem install bson_ext
..................FF.....
1)
ArgumentError in 'Delayed::Backend::CouchRest::Job#name should be the instance method that will be called if its a performable method object'
wrong number of arguments(1 for 0)
/home/gramos/.rvm/gems/ruby-1.9.2-tv1_9_2_preview2/gems/mongo_mapper-0.7.5/lib/mongo_mapper/document.rb:161:in `initialize'
/home/gramos/.rvm/gems/ruby-1.9.2-tv1_9_2_preview2/gems/mongo_mapper-0.7.5/lib/mongo_mapper/document.rb:161:in `new'
/home/gramos/.rvm/gems/ruby-1.9.2-tv1_9_2_preview2/gems/mongo_mapper-0.7.5/lib/mongo_mapper/document.rb:161:in `block in initialize_each'
/home/gramos/.rvm/gems/ruby-1.9.2-tv1_9_2_preview2/gems/mongo_mapper-0.7.5/lib/mongo_mapper/document.rb:160:in `each'
/home/gramos/.rvm/gems/ruby-1.9.2-tv1_9_2_preview2/gems/mongo_mapper-0.7.5/lib/mongo_mapper/document.rb:160:in `initialize_each'
['(run_at <= ? AND (locked_at IS NULL OR locked_at < ?) OR locked_by = ?) AND failed_at IS NULL', db_time_now, db_time_now - max_run_time, worker_name]}
I am Mr. Ahmed Khizer Khan a citizen of UAE .I have in my bank the existence of a very big amount of money that belongs to a customer , Mr. Daniel ramos who happen to have the same surname as yours .The fund is now without any claim because Mr. Daniel died in a deadly earthquake in China in 2008 . I want your cooperation so as to make the bank send you the fund as the beneficiary and next of kin to the fund.
This transaction will be of a great mutual assistance to us. Send me your reply of interest so that I will give you the details .
Strictly send it to my private email account : mrahmedkhanuaei@hotmail.com or send me your email address to send you details of this transaction.
At the receipt of your reply, I will give you details of the transaction. And a copy of the Deposit certificate of the fund and also the incorporation certificate of the company that generated thid fund .
Best regards,
Mr. AHMED kHIZER KHAN.
#\ -w -p 8765
use Rack::Reloader, 0
use Rack::ContentLength
app = proc do |env|
[ 200, {'Content-Type' => 'text/plain'}, "a" ]
end
run app
View:
<% form_for(@post) do |f| %>
<%= f.error_messages %>
<%= fckeditor_textarea("post", "post", :toolbarSet => 'Easy',
:width => '100%', :height => '400px') %>
<% end %>
------------------------------------------------------------------------
[gramos@marlasina:~/src/rails/rails/activeresource(dev)]$ rake test
(in /home/gramos/src/rails/rails/activeresource)
/home/gramos/src/rails/rails/activesupport/lib/active_support/inflector/methods.rb:113:in `constantize': uninitialized constant Person (NameError)
from /home/gramos/src/rails/rails/activesupport/lib/active_support/inflector/methods.rb:112:in `each'
from /home/gramos/src/rails/rails/activesupport/lib/active_support/inflector/methods.rb:112:in `constantize'
from /home/gramos/src/rails/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:43:in `constantize'
from /home/gramos/src/rails/rails/activemodel/lib/active_model/observing.rb:162:in `observe'
from /home/gramos/src/rails/rails/activemodel/lib/active_model/observing.rb:162:in `collect!'
from /home/gramos/src/rails/rails/activemodel/lib/active_model/observing.rb:162:in `observe'
from ./test/observing_test.rb:7
script/spec spec/models/vqa_license_spec.rb
/home/gramos/grid/apps/phonetag-api-clients/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/home/gramos/grid/apps/phonetag-api-clients/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb:31:in `describe': wrong number of arguments (2 for 1) (ArgumentError)
from /home/gramos/grid/apps/phonetag-api-clients/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb:31:in `create_example_group'
from /home/gramos/grid/apps/phonetag-api-clients/vendor/plugins/rspec/lib/spec/dsl/main.rb:28:in `describe'
from ./spec/models/vqa_license_spec.rb:3
from /home/gramos/grid/apps/phonetag-api-clients/vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in `load_without_new_constant_marking'
from /home/gramos/grid/apps/phonetag-api-clients/vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in `lo
require 'spec_helper'
describe VqaLicense do
before(:each) do
@valid_attributes = {
}
end
it "should create a new instance given valid attributes" do