Displaying 20 results from an estimated 100000 matches similar to: "sequel"
2007 Nov 07
1
merb/sequel mutex on or off? proxy_balancer or no?
Just a quick question to those of you using merb and sequel or
datamapper. How do you setup your merb app?
For example:
merb -X off -c 5, then run mod_proxy_balancer or nginx to load balance
between the 5 (or whatever #) of merb nodes?
merb -X off -d, then simply use something like proxypass
merb -c 5, keep the mutex lock and cluster it
haproxy, swiftiply, evented mongrel......
What
2010 Nov 08
0
Rails3: "rake test" task does not run tests.
Hello all,
I have a spiffy new rails3 app for which I can run tests individually,
but not via rake. Behold!
> $ ruby -Itest test/unit/test_user.rb
> Loaded suite test/unit/test_user
> Started
> .
> Finished in 0.466033 seconds.
>
> 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
>
> Test run options: --seed 21789
and
> $ rake test:units --trace
> (in
2012 Oct 24
0
RoR Developer (Full Time, Salary)
We are an established and profitable technology company, making software
in the fast-growing medical marijuana industry. Although it would help,
you do not need to be involved in the medical marijuana industry to
apply. We work out of an office near the Denver Tech Center (Hampden &
Yosemite). Day to day, we use Rails 3.2, Ruby 1.9.3/1.9.2, JavaScript
(CoffeeScript), MySQL, and Git (Github).
2007 Dec 12
3
merbful_authentication
Since there are so many efforts at the moment to port restful_authentication
I figured I''d put a repo up so that it can be a collaborative effort.
You can pick up a copy of the repo at
git clone http://snatcht.com/git/merbful_authentication.git
at the moment the app is in a branch. Not in the master.
get the branch by
git checkout -b remote/initial origin/inital_repo
At the moment
2011 Dec 23
0
Datamapper problem "no such table"
Hi, this code used to work, but for some reason it won''t now:
[... load models]
DataMapper.setup(:default, "mysql://cm:password-yro0w6Hh2UrkfKl135yGWg@public.gmane.org/cm")
DataMapper.setup(:lite, "sqlite3:///home/tigre/cm.sqlite")
DataMapper.finalize
DataMapper.repository(:lite).auto_migrate!
DataMapper.repository(:lite) do
w = WorkCenter.new(:name =>
2010 May 27
1
Question on Rails 3 : forms && ORM && ActiveModel
I''m a Django/Catalyst user that''s evaluating Rails ... I need a Ruby
framework, and I''m trying to see if learning Rails is worth it or I
should just go for Sinatra + various libs available.
Django has a couple of things I like ...
1) the Forms API
In Django I like that it''s being decoupled from models ... form
objects have fields with validation rules that
2011 Mar 18
6
Could not find sqlite3
I am trying to get Ruby/Rails running on my mac but having some issues.
I created a new rails project "blog_test" trying to get something
working.
When I follow this guide
http://guides.rubyonrails.org/getting_started.html it says to do a
"db:create". This is where I get this error...
Could not find gem ''sqlite3 (>= 0)'' in any of the gem sources listed
2008 May 18
0
Spec a before_destroy callback in Sequel
Hi
I''m struggling to find a neat way to spec this. The Sequel ORM
doesn''t support automatically destroying dependent models. It''s easy
enough to do in a callback though:
class Changeset < Sequel::Model
has_many :migrations, :class => DataModel::Migration
before_destroy do
migrations.each { |m| m.destroy }
end
# ...
end
2010 Aug 05
3
how to ? Rails 3 ActiveRecord eager loading and AREL
Hello everyone,
I would like to eager load scoped records to avoid queries executed in a
loop (huge performance impact).
The "scoped" part is what is giving me a hard time.
I''m using Rails3 RC.
Does anyone have any idea how I can do it?
Here is a test case : we have an "Article" and a "Comment" Activerecord
models,
article has many comments
comment
2012 Apr 27
3
rails console --sandbox is only half-baked
Recently I''ve found out some mentions to the "--sandbox" parameter to
the "rails console" command.
And I found the idea interesting, but since I''m using Sequel instead of
ActiveRecord I guessed this wouldn''t work for me.
But after talking about this subject in the Sequel mailing list, Jeremy
Evans has brought to my attention that there are some
2010 Mar 10
0
Rails ActiveRecord associations autosave option
I have the following associations.
class Document < ActiveRecord::Base
has_many :document_sections, :dependent => :destroy, :autosave => true
has_many :document_items, :through => :document_sections
end
class DocumentSection < ActiveRecord::Base
belongs_to :document
has_many :document_items, :dependent => :destroy, :autosave => true
end
class DocumentItem <
2012 Feb 14
4
What I'm doing wrong, has_and_belong_to_many
Hello, I''m trying to insert into my migrate but when I try on rails
console this error shows:
1.9.3-p0 :001 > group = Group.new
=> #<Group id: nil, name: nil, description: nil, created_at: nil,
updated_at: nil>
1.9.3-p0 :002 > group.name = "Group Name"
=> "Group Name"
1.9.3-p0 :003 > group.description = "Description"
=>
2011 Jul 26
1
ActiveRecord has_many associations
Given the models Country, State, City and Person as follows.
class Country < ActiveRecord::Base
has_many :states
end
class State < ActiveRecord::Base
belongs_to :country
has_many :cities
end
class City < ActiveRecord::Base
belongs_to :state
has_many :people
end
class Person < ActiveRecord::Base
belongs_to :city
end
Is there any way that doesn''t allow to delete
2007 Oct 23
2
sample app using Sequel?
I''m a new merb user. Rather than ask a bunch of questions on this
list, I''d like to ask if anyone can point me to a sample merb
application preferably using trunk (or close to it) and preferably
using Sequel for the ORM.
If I can''t figure out how to bull my way through things from a
sample, I''ll come back and ask my newbie questions. Thanks!
cr
2010 Oct 11
8
Nooby Stuck - "has_and_belongs_to_many" relationship
trying to set up a "has_and_belongs_to_many" relationship
would very much appreciate the help, not sure what im doing wrong at all.
Scheme.rb
class Scheme < ActiveRecord::Base
validates :schemename, :presence => true
belongs_to :user
has_many :levels, :dependent => :destroy
has_and_belongs_to_many :works
end
Work.rb
class Work < ActiveRecord::Base
2010 Aug 19
1
has_many :through question
I am trying to create an association table using the ":through" option
in "has_many" but not having success. I have created the necessary
migrations of the association tables and run rake db:migrate
I have the following model:
class Group < ActiveRecord::Base
has_many :users, :through => :group_user
has_many :invites, :through => :group_invite, :class_name =>
2010 Jun 15
2
ActiveRecordConnection from jobs script
Hi,
I make a cron jobs and I would like to use ActiveRecord. but I have this
error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'': ActiveRecord::ConnectionNotEstablished
(ActiveRecord::ConnectionNotEstablished)
Do I have to require
2010 Sep 29
2
Railroad problem with :through?
I have the following model layout:
class List < ActiveRecord::Base
has_many :subscribers, :through => :list_subscribers
has_many :list_subscribers
end
class Subscriber < ActiveRecord::Base
has_many :lists
has_many :lists, :through => :list_subscribers
end
class ListSubscriber< ActiveRecord::Base
belongs_to :list
belongs_to :subscriber
validates_uniqueness_of :subscriber_id,
2011 Sep 23
4
Could not find a valid gem 'activerecord-mysql-adapter' (>= 0) in any repository
Hi,
since upgrading my gems from activerecord-3.0.10 to activerecord-3.1.0
my scripts using activerecord don''t work anymore. I get an error
message
Error Please install the mysql adapter: `gem install activerecord-
mysql-adapter` (Could not find RubyGem mysql (~> 2.8.1)
)
but gem does not find such a package:
ERROR: Could not find a valid gem
2011 Sep 01
2
Custom ActiveRecord Error Message
I''m generating 3 models on 1 controller and i''m rescuing
ActiveRecord::RecordInvalid for validation errors, however 2 of the
models have the same attribute called "name", and if there''s an error on
that field, I wouldn''t know whether that belongs to model A or model B.
What then is the best way of modifying the error message of a validation
error