Displaying 20 results from an estimated 1000 matches similar to: "Session Based Record Locking - Solutions?"
2006 May 09
7
When to use optimistic locking?
Hi All,
I''m having some trouble deciding when and how to implement optimistic
locking.
Let''s say I have a multiuser Rails app, and let''s say it stores,
among other things "vital" customer information.
The standard methods created by the Rails generate scaffold script
look like this:
def edit
@customer = Customer.find(params[:id])
end
2006 Apr 03
11
Runaway FCGI Processes with Debian, Apache
Hi all.
There is an issue with Rails, FastCGI and Apache2 on
Debian that I''ve been dealing with since I started
Rails development in late 2005. I''ve developed
various workarounds but have not been able to solve
the problem at the root.
Every so often, for reasons I''ve never been able to
determine, a load of dispatch.fcgi processes get
spawned and take over my whole
2009 Aug 10
1
[PATCH server] Fixed db-omatic so it doesn't die due to an unhandled ActiveRecord::StaleObjectError exception.
The error is caused by the save! method updating an object that another
thread (most likely in taskomatic) already updated.
In the case of this race condition, we retry saving. However, a proper fix
would involve fixing the locking.
---
src/db-omatic/db_omatic.rb | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/db-omatic/db_omatic.rb
2006 May 15
5
Australian Ruby/Rails Web Host
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: rebecca.vcf
Type: text/x-vcard
Size: 414 bytes
Desc: not available
Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060515/4cd2f87d/rebecca.vcf
2006 Apr 22
6
Friendly Reminder (OT)
Today, I had a tragic hard drive crash. I hadn''t updated anything to SVN in
two weeks.
I''m posting this here as a reminder to my beloved Rails community.
Everyone, right now..... make a backup of your rails work. Make sure its on
two disks. Many of you already do that automatically, but just make sure its
working.
Two near-release rails plugins were lost in the tragic crash
2006 Apr 30
2
restart with capistrano
Hi all
I bumped into the following issue: when trying to restart with capistrano,
it does restart, but with the app from the old deployment directory.
desc "Restart the app server."
task :restart, :roles => :app do
run "mongrel_rails restart -c #{current_release}"
end
Has anybody a better solution for that ?
--
Roberto Saccon
-------------- next part --------------
An
2006 Apr 19
4
Deployment with Capistrano
Hey all,
Has anyone out there got Mongrel deployments working with Capistrano?
I''ve had a crack at setting it up, and I''ve found that after a
deployment (with updated symlinks) that a mongrel restart does not
pick up the new deployed site. It seems to me (in my linkted
experience) that the HUP that is sent to mongrel does not re-evaluate
the ./current symlink that Cap puts in
2009 May 19
4
proper way to ensure atomic model changes
Hi!
Say we have a rails active-record-based model called "instance" which
can have different states - STOPPED, RUNNING, STARTING_UP,
SHUTTING_DOWN, etc...
There is a method #start which changes the instance state to
STARTING_UP only if it is STOPPED.
def start
if self.state == STOPPED
self.state = STARTING_UP
self.save
...
end
end
As you understand if we have multiple
2008 Feb 08
2
update_Attributes stale Object error
Hi,
IN one of my unit tests I get an ActiveRecord::StaleObjectError:
Attempted to update a stale object
object.save!
in object I have apart from other stuff an after_save method, which
calls
object.assosication.update_attributes(...)
If I remove that line from my code my tests succeeds.
Unfortunetly, I do not understand why an update_attributes call can
generate an StaleObjectError.
Maybe
2006 Apr 11
1
Implementing Optimistic Offline Lock - How ?
I understand that ActiveRecord supports the "optimistic offline
lock"-pattern through magic fields (created_at, updated_at). However, a
scaffolded CRUD-Controller doesn''t generate the necessary code to
support this feature (the model state gets lost between two action
calls).
What is the best practice to prevent users from overwriting objects with
outdated data ?
--
2006 Apr 11
2
using log4r and rails
hey everyone. i know somebody else had started a thread on this subject,
but since no one seems to be answering that thread i thought i would
start one of my one.
i''m doing a project for a client and we need some seriously verbose
logging. it looks like log4r can do what i need, but i can''t for the
life of me figure out how to plug it into rails. everywhere talks about
how
2006 May 08
4
Rubyy on rails hosting
All,
Could any of you recommend an out fit for hosting my rails app that is
not expensive with excellent support. Thanks
Patrick
2006 Feb 10
5
Re: Manually running dispatch.fcgi fails (Please help!!)
I''m really lost on this issue. Do I need to reinstall rails / gems?
The rest of my rails setup seems to be working. I just can''t run
dispatch.fcgi. (Details in original message below).
I have no idea how to troubleshoot this. I''m not even positive it is
supposed to be runnable from the command line. I found a
troubleshooting guide that implied it was supposed to
2007 Jan 03
2
error_message_on broken?
Hi,
in my app, using the error_message_on form helper like this:
<label for="user_name">User name:</label>
<%= error_message_on ''user'', :name %>
<%= f.text_field :name %>
generates the following error:
undefined method `errors'' for :user:Symbol
I am using edge revision 5813 and the simply_helpful plugin. Is there a
way to fix this?
2006 Aug 10
7
Mongrel and SSL?
I have a small intranet app with only 20 or so users.
I''m currently using lighttpd w/ssl for production and mongrel for dev.
I don''t think Mongrel supports ssl, but what is the easiest front-end
to put in front of it? Pound?
Thanks
Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
2006 Feb 15
5
Lighttpd now works for production. Development is broken?
I''ve finally gotten lighttpd working for my production instance (SUSE
10.0 with SSL).
(Had to install the fcgi dev toolkit, the SUSE 10 ruby-fcgi rpm, and
the fcgi gem. I''m not positive all 3 were required, but that is what
I did.)
Now the devel instance of my app is broken.
I''m not sure how to fix it.
Previously I was using WEBrick for both devel and production.
2006 Apr 12
8
newbie radrails question
I''ve just install Eclipse with RadRails for the first time.
I''m trying to follow the very simple DemoAppPart1 at
http://wiki.awebfactory.com.ar/awebfactory/published/DemoAppPart1
When I click on the DepotServer and try to start it WEBbrick is not starting.
I can cd to the base directory and run script/server and it works.
Any idea what I''m doing wrong?
Thanks
Greg
2006 Jan 16
17
LoginEngine / UserEngine conceptual help
All,
I have a small Intranet app I''m trying to get ready for remote access.
(I only have 15 or so users for now and I don''t plan to be adding
very many more.).
I have installed the login engine and it seems to be working as
advertized. (Great job!)
For my needs I don''t want random people to be able to register and get
access to my app, but I will need to register
2006 Apr 03
11
Rails VPS Business Hosting
Greetings,
Does anyone have experience with Rails VPS hosting? I''m basically
looking for a hosting reseller option so I can have control of my
clients domains and hosting. I''m looking for something easy to use;
although I like learning it all, and am learning a lot, I am most
definitely not a command line linux user type as of yet.
The one that I''ve looked at
2005 Dec 27
3
created_on & updated_on - helper to display date only
All,
My initial list is rather busy. I would like to shorten the
created_on and updated_on fields to just display the date, not the
time. Best wold be a simple 12/28/05 type of presentation.
I''ve found the format helpers in rdoc. (ie.
distance_of_time_in_words_to_now ), but none seem to be what I''m
looking for.
How do I control the date format of a timestamp field?
Thanks