Displaying 20 results from an estimated 400 matches similar to: "blog_id magic with typo"
2006 Nov 30
4
Mongrel Cluster init.d problems
I have installed mongrel and mongrel_cluster fine and have them
running great with my app. I tried using the init.d script provided
with mongrel_cluster 2.1 to start it up on boot but it doesn''t.
mongrel_cluster_ctl works fine for me by hand and so does
/etc/init.d./mongrel_cluster start. I am on Debian so I installed the
service links with sudo update-rc.d mongrel_cluster defaults. And
2006 Nov 05
5
backgroundrb preview
Hi Ezra/skaar,
Wow man, the exercise was worth it. The connection closed problem with
socket as i mentioned in my earlier mails...completely disappeared,
and now i can connect only once to the socket and keep reading..till
end of its days.
Literally impossible with older release of backgroundrb.
This could also potentially solve the issues people were having with
ActiveRecord.
As i said
2006 Nov 27
5
win32 problems
I''m setting up a Rails app for a client that uses Windows. I''m
getting this error:
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.18/lib/mongrel/rails.rb:
32: uninitial
ized constant Mongrel::HttpHandler (NameError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:21:in `re
quire''
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.18/bin/
2006 Dec 15
5
Testing event driven Socket classes
Ok, here is the class, I want to Unit Test, its part of a large app
and is based on EventMachine library.
I want to mock the class TickServer ( i.e not stub it) . Since in
actual scenario, you can''t do this on this class:
@server = TickServer.new # will toss an exception at your face
you must initialize the server like this:
EventMachine.run {
2006 Nov 07
2
start a worker when bdrb starts
I am sure..again I am missing something, but I am trying to start a
worker, when backgroundrb starts and it doesn''t seem to work.
Here is my config/backgroundrb_schedules.yml file:
feed_worker:
class: feed_worker
job_key: feed_worker_key
worker_method: do_work
trigger_args:
repeat_interval: 20.minutes
I even tried this from Rails controller:
# def start_feed_worker
#
2006 Oct 12
2
Too Many Mysql connections
In my app, for three models: foo,bar and baz, the database connection
is made to a different database and hence in model code:
class Foo < ActiveRecord::Base
establish_connection :diff_database
end
class Bar < ActiveRecord::Base
establish_connection :diff_database
end
class Baz < ActiveRecord::Base
establish_connection :diff_database
end
Now, the problem is, if is use the above
2006 Jul 17
2
Trouble with has_one
Hi,
I''m trying to write a blog application where each post has a single
header image associated.
My models:
----------
class Post < ActiveRecord::Base
belongs_to :blog
has_many :images
has_one :header
end
class Header < ActiveRecord::Base
file_column :image_path
end
class Image < ActiveRecord::Base
belongs_to :post
file_column :image_path
end
The controller targets I
2006 Nov 07
1
scheduled jobs with cron
I''m very interested in using backgroundrb for running jobs every n minutes.
The release notes say that this functionality is not yet ready via
backgroundrb. But I wonder, can I call backgroundrb with a ruby script
from cron ?
I know I could create a cron job that calls lynx (or whatever) on a
specific page that will call backgroundrb, but I want to know if there
other
2006 Sep 18
1
Problem with install on IR/Windows
I''m getting an error I don''t understand when I try to install the BackgrounDRb plugin.
I installed the plugin yesterday, or thought I did, and tried this morning to start the daemon. Got an error and so tried to reinstall using:
>ruby script\plugin install svn://rubyforge.org//var/svn/backgroundrb --force
The first line of the reponse says:
svn:
2006 Dec 15
3
how to install from svn?
When trying to run Chris samples I get error:
/usr/lib/ruby/gems/1.8/gems/mocha-0.3.2/lib/smart_test_case.rb:3:
uninitialized constant Test (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
from /usr/lib/ruby/gems/1.8/gems/mocha-0.3.2/lib/mocha.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:33:in
2007 Mar 25
1
Automatic HTTP Basic Authentication In Ruby on Rails
Hi,
i need to access a url
www.sometesturl3456.com/index.php
It prompts HTTP Authentication window asking username and password. I
have do automatic HTTP Basic authentication without manual entry of
username and password, as i am reading the content of page in ruby in
rails using:
response = open("www.sometesturl3456.com/index.php").read
Please help me to know how this can be done.
2007 Apr 04
2
unit tests?
Ezra et al:
I have this problem:
http://rubyforge.org/pipermail/backgroundrb-devel/2006-December/000578.html
Any progress on it? Or are unit tests simply impossible for now?
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
2008 Oct 09
2
has_many validation the Rails way
Okay, this is something I run into a lot and don''t really have a great
solution. Here is a simple example:
class Blog < ActiveRecord::Base
has_many :posts
validates_presence_of :name
end
class Post < ActiveRecord::Base
belongs_to :blog
validates_presence_of :name
validates_presence_of :blog_id
end
Now, if I want to create a blog and post at the same time I
2006 Sep 21
5
Static files in public
My question is about the static files in the Rails public folder. These
files should be served by Apache instead of Mongrel, so do I need to
upload these files to Apache''s htdoc''s or will Apache cache them the
first time they are requested from Mongrel... Im not sure how this works?
Many thanks.
2007 Feb 01
4
Automatically Indexing Associated Models
PROBLEM
I have two models, Blog and BlogComment. When a blog is initially
created, it has no comments. Upon creation, the title and body are
automatically added to the ferret index and directly searchable.
However, when a comment is added to a blog, that comment does not get
added to the index and is therefore not ferretable. The desired behavior
is that when a comment is added to a blog, that the
2007 Mar 05
2
Scheduled workers only run once unless you call self.delete inside the worker
I had a worker scheduled to run every minute with
backgroundrb_schedules.yml:
ebay_runner:
:class: :ebay_auction_worker
:job_key: :ebay_auction_runner
:trigger_type: :cron_trigger
:trigger_args: 0 * * * * * *
This worker posts an auction to eBay from a queue of auctions every minute.
I was having a problem where the worker would run ok the first time, but
never any subsequent minutes
2006 Jan 31
4
Rails bug? Conditions on associations ignored by eager loading
I''m looking for someone to confirm the following as a bug in Rails
1.0 before I post it to Trac.
If I use eager loading on an association that has conditions defined,
the conditions are ignored.
The following example illustrates the problem. I have two tables:
create_table "blogs", :force => true do |t|
t.column "name", :string
end
create_table
2006 Sep 07
6
form_for - Child object - how to set parent id
Hi All,
I am just trying to learn ruby/rails so please don''t flame me if this is
a stupid question.
As a learning project I decided to create my own blog using ROR. I have
created a controller that shows paged blog entries, and below each blog
is a list of comments along with a form alowing the user to add a new
comment.
To create the form for the comment entry I used form_for
2006 Dec 11
4
creating a cache in rails
I need to create a small hash of values that persists across requests in
Rails. I cannot store this information in the database or filesystem
and only want to do it in memory. I was looking for a simple solution
to implement this and read somewhere that memcache is pretty much
overkill. This app is only running on one server so putting in memory
should be just fine. I''m very new to
2006 Sep 25
3
Engine Yard blog
Just received the news from Tom Mornini.
Congrats Ezra for the new Engine Yard site and the blog you will be
collaborating.
Hope to read you there soon.
http://www.engineyard.com/
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060925/3f251fa4/attachment.html