Displaying 20 results from an estimated 50000 matches similar to: "Rails - ActiveRecord doesn't commit, cache problem ?"
2006 Nov 10
3
Move variables from session to ActiveRecord?
Buildings have units. Units have rooms. Rooms have people. I can grab
building, room, and people IDs and store them in a session[:variable].
However, when creating a new unit, I need to give that
session[:building_id] to ActiveRecord for creation. I''m not sure
whether to use hidden fields or do it all in the model
''before_validation'' - in either case I
2006 Jul 03
2
Agile Web Dev on Rails - ActiveRecord::RecordNotFound Prob
Hi there
I''ve also made a start on the Agile Web Dev using Rails book! I''ve been
hit with a problem when hitting the ''Add to Cart'' button - I get the
following error message:
ActiveRecord::RecordNotFound in StoreController#add_to_cart
Couldn''t find Product without an ID
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full
2010 Feb 26
2
Change idle timeout
Hi,
We are using a samba server as a NTLM authenticator for our web filter.
However, Samba closes the SMB connections after 60 seconds of inactivity,
causing connections from the web filter to the Samba DC to get stuck in
CLOSE_WAIT state, and failing to authenticate the users.
Is the some way, other than changing IDLE_CLOSED_TIMEOUT, or (in Samba
3.0.23) commenting the check that closes the TCP
2012 Dec 05
3
Fwd: Issue starting unicorn with non-ActiveRecord Rails app
Hi,
I''m trying to use unicorn in a test deployment of a Rails app that
uses Mongoid, so Activerecord isn''t included in the app. When I start
unicorn through Capistrano though, the stderr log fills up endlessly
with identical ActiveRecord-related errors:
I, [2012-12-05T04:19:25.375952 #5096] INFO -- : Refreshing Gem list
I, [2012-12-05T04:19:32.941249 #5096] INFO -- :
2006 Jul 10
1
ActiveRecord batch insert for MySQL
Hi guys,
I am a pretty new developer for RoR, and I am wondering whether batch
inserts for ActiveRecord are available. I know that
ActiveRecord::Base::create accepts an array of hashes, but from the
MySQL logs, I can see that the inserts are not batched.
Would like to stay within the ActiveRecord framework, if possible.
Thanks in advance for comments and suggestions.
v
--
Posted via
2006 Aug 18
1
customization of ActiveRecord models
I''m trying to determine how/if I can use MySql''s spatial extensions
with ActiveRecord. The spatial extensions usually require inserts in
the following format:
INSERT INTO `locations` (name, point) VALUES ("location
name",GeomFromText(''POINT(<lng> <lat>''));
And reads as
SELECT name, AsText(point) AS point FROM locations;
While I
2012 Apr 17
0
Request for adding an "alias"/"as" to ActiveRecord
I often find myself in situations where I''m fighting against
ActiveRecord because there is no easy way to alias some tables.
For example, I''m converting a legacy application. So, there is a
''condition_type'' table that actually should be something like ''fields''.
Also it can have a parent field and deletion is handled by setting a
2006 Jun 22
0
SessionCleanup (clean up sessions within Rails app)
SessionCleanup is a routine to clear out stale sessions from within a
Rails application.
A Rails application creates a new session for every connection. Over
time, this leads to the accumulation of hundreds or thousands of stale
session files or session records (if you''re using a database). These
sessions are often cleaned out manually or by the use of a cron job.
Neither of these
2003 Nov 20
0
Hangs while prowsing a samba 3 share with windows xp prof.
Hi,
I have problems with Samba 3.0.0 on my debian box. I first noticed this
problems after the last dist-upgrade of my debian installation.
When I'm reading a file from the smaba share and browsing another share
from the same samba server, I have several hangs and browsing is very
slow. It seems that there are some timeouts. But I can't figure out a
configuration problem, especialy
2009 Mar 07
0
Be careful of BIGINT primary key fields in MySQL. Will cause problems with ActiveRecord create (but not find)
The MySQL/Ruby library doesn''t properly handle inserts into tables
with the primary key being a BIGINT
If the ID returned to the MySQL/Ruby library is LARGER than the INT
range, the value is returned to Ruby truncated and incorrect. This is
then passed up to ActiveRecord and into the id field of your model.
The actual INSERT worked properly and when do you an ActiveRecord find
for the
2014 Nov 10
1
syslinux -> Windows 2008R2
Hello,
I'm trying to use a current Syslinux setup, that is working well for
service linux based distros, to serve up recent Windows server installs.
As I'm new here I'm reluctant to make any changes to the environment unless
I've exhausted the current options.
We are running Syslinux 3.71 on a Gentoo server and all the DHCP and tftpd
are "working as they should".
What
2011 Aug 07
9
How can I disable Rails 3.1's ActiveRecord Query Caching?
Hey guys,
As most of you know, Rails 3.1 introduces query caching for
ActiveRecord. Great change all-in-all, but for those of us with IT
department mandates for using MySQL (yeah, yeah, I know...), it''s kind
of a mixed bag.
I need to disable query caching in a project I''m building based on
3.1. I''ve tried a couple different approaches, both without any
success. I
2010 Sep 02
1
ActiveRecord::ConnectionAdapters::Column value_to_boolean(value) does not return a boolean value.
value_to_boolean(value), does not always return a boolean value, only
when true.
150: def value_to_boolean(value)
151: if value.is_a?(String) && value.blank?
152: nil
153: else
154: TRUE_VALUES.include?(value)
155: end
156: end
If value is contained in TRUE_VALUES then it returns true(TrueClass).
But if value is
2009 Sep 09
0
Rails 2.3.4 ActiveRecord association problem
Upgraded our app from Rails 2.2.2 to 2.3.4, and I''m now encountering
an error when adding a child to a parent.
Top of the stack:
wrong number of arguments (1 for 0)
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
associations/has_many_association.rb:61:in `save''
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
2007 Sep 21
1
Using AAF with ActiveRecord outside of Rails?...
Hi,
My project has been happily using ActiveRecord outside of
Rails for some time to populate various databases that are
also used in Rails based websites.
I''d like to bring AAF into this setup to index new records
that are added to the databases as they''re added.
Has anyone had any success in installing and using AAF
with ActiveRecord but outside the Rails plugin support?
I
2013 Feb 18
6
How to clear ActiveRecord query cache on associations with dynamic table
In part of my application I''m using dynamic tables. I''m aware of the single
thread conditions. I''ve tackled some caveats yet - will post a blog about
it soon - but there''s one I need help with.
Consider 2 models that are associated: Order and OrderLine where Order has
many order_lines.
Now we set the table names for them:
2010 Jul 04
1
Rails 3: ActiveRecord .include not working
Really no idea what''s up...
class Auction < ActiveRecord::Base
has_and_belongs_to_many :categories
end
class Category < ActiveRecord::Base
has_and_belongs_to_many :auctions
default_scope order(''title'')
scope :active, where(:active => true)
end
class CategoriesController < ApplicationController
respond_to :html, :json
# GET /categories/:id
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 <
2006 Jan 06
0
bug rails activerecord association join
hi,
I found a bug in ActiveRecord association SQL INNER JOIN codes. in
has_many, has_one, habtm and belongs_to queries the foreign key is
determined from the table name of reflection and self. but that''s
worng because if you use a global prefix or suffix for your tables the
foreign keys will be in format of PREFIX_CLASSNAME_SUFFIX_id which is
wrong, because it breaks the advantage of
2006 Mar 02
2
Use ActiveRecord outside of Rails to upload to database?
Sorry if this has been asked in the past, but the search function is
still down...
My scenario:
For my research agency, I''m trying to download XML files from the
National Weather Service (NWS) and import certain data into my SQL
Server database. Normally, I would use .NET to do this, but I''m trying
to find a Ruby solution.
Question:
Suppose I write a Ruby script to run