similar to: Migrate postgresql database to uuid

Displaying 20 results from an estimated 200 matches similar to: "Migrate postgresql database to uuid"

2006 Apr 04
3
uuidtools across processes
Hello, It seems that there is a small probability of collisions among uuid''s produced by uuidtools'' UUID.random_create() running in concurrent user processes on a host (fcgi)? The ~2 bytes extracted from the randomized clock_sequence make a collision unlikely. http://rubyforge.org/frs/download.php/8572/uuidtools-1.0.0.zip Do I miss something? DD -- Posted via
2006 Feb 22
4
UUIDTool and weird timestamp split error
Hi, I am using UUIDTools to generate my Guids. It works fine on my computer (Windows Xp), but doesn''t work on my host (TextDrive) The error is: Loading production environment. >> UUID.timestamp_create.to_s /sbin/ifconfig: Permission denied NoMethodError: private method `split'' called for nil:NilClass from ./script/../config/../config/../lib/uuidtools.rb:236:in
2012 Oct 17
1
generate 10 UUID records and save it it database in rails
I need to create certain number of UUId records(based on the selection of drop down) and save it in the database. Now I am generating only one unique id. Can this be done in the model in this way. Or do I need to write a helper file for that?? def generate_unique_token=(value) self.secret = Base64.encode64(UUIDTools::UUID.random_create)[0..8] end In my controller........... def create
2013 Oct 27
5
run simple method from Helper on button click
Greetings, I''m new to rails and currently having couple problems about how to add javascript functionality into rails. I have a simple method in the helper and i want to run this code on button click. ------------------------------------------------------------------ module PagesHelper def show_message "simple output" end end
2008 Apr 03
1
Problem with UUID generated in partial not being unique
Folks, I''m using the "uuidtools" package to generate (hopefully) unique values for IDs within a partial (for products being added to an order form, where nothing is saved to the DB until the end). Unfortunately when I add a new product line (using RJS page.insert.html rendering a partial) the new lines added all have the same UUID. Here''s the code from the (top of
2006 Jun 18
2
using javascript to get an attribute using an ID
Hi everyone, I''m trying to use ajax to update the selected value of a select element. Here''s what I have so far: function RailsModel(model_name) { this.model_name = model_name; } RailsModel.prototype.getAttributeById = function(attribute, id) { Ajax.Request(''/models/get_attribute_by_id/'' + this.model_name + ''/'' + attribute +
2013 Jul 21
4
how to use activemodel collection.build for a has_many :through association
Hi all, In my controller I am doing the following to populate a nested form for a has_many through association: def new @specification = Specification.new Component.find_each.each do |component| @specification.component_specifications.build(:component_id => component.id) end The idea being whenever someone creates or edits a form, it will be populated with all
2012 Sep 23
6
Missing template projects/index, application/index ?
Getting this issue...even though I have my views there in both the projects and application. Also getting a routes issue "No route matches [GET] "/projects" when going to projects when I have root :to => "projects#index" defined in my routes file. Any idea? 1) Creating Projects can create a project Failure/Error: visit ''/''
2007 Jan 10
2
Corrupt index and segfaults with heavy writes?
Hi everyone, We''re running a fairly heavily used Rails app that uses ferret (and acts_as_ferret) for search. We''re running on mongrel+Apache, Ruby 1.8.4, and ferret 0.10.13. We''re indexing a handful of attributes on our "Image" and "User" models. After the system has been running for several days, the index gradually becomes corrupted, and ferret
2011 Apr 09
4
API documentation for find_in_batches
Hello, At guides.rubyonrails.org I read about the possibilities of find_in_batches. However I cannot find this option anywhere in the API documentation (api.rubyonrails.org). My question: where should I look for the documentation of this command? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email
2011 Jan 28
5
mysql quotation wonky
Why would, in an upgrade from 3.0.1 to 3.0.3, a rake db:migrate run this: SELECT "schema_migrations"."version" FROM "schema_migrations" vs this ? SELECT `schema_migrations`.`version` FROM `schema_migrations` __ rake db:migrate output __ rake aborted! Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
2012 Jan 11
4
ActiveRecord: ar-each_model
Hi, today I went into a problem, when I had to iterate over a big result set. ActiveRecord produces a huge array of model instances, which consumed 1GB of memory on my machine. A comparable perl DBI script only used some KB for iterating over the result set. Then I was suggested to use batch (#find_each) for the problem. But basically batch does the same thing by splitting the query into several
2006 Jan 23
8
yield vs @content_for_layout, etc..
I am relatively new to RoR and Ruby for that matter. A few questions for the pros: Question 1: In the 5min ajax video the presenter uses <%= yield %> in his layout. In the agile book, @content_for_layout is used. Since, yield is an actual Ruby construct, is it more efficient and preferred? What is the difference? Question 2: Links are often of the form :action =>
2011 Jul 28
14
Actionmailer Help Needed
Hello everyone, Nice to meet you all, am new to the forum. I''m stuck with rake / actionmailer trying to display a set of found records. We have a simple actionmailer rake task that is supposed to send a daily email digest of tasks that are due for a specific user. So far, it''s working but the email only displays the first message. In my task model scope :tasksdue, lambda {
2006 Jan 12
8
Synching between Sqlite and MySql
Hi folks, I am running an offline Rails app that periodically connects to the Internet to download the latest catalogue, and upload any new orders. I am about to implement the synching bit - and was thinking whether there is any other solution other than writing webservices and code to do a manual sync of the data, or whether there is a more nifty and robust way using say replication?
2009 Jul 20
9
rake error
When I run rake test:units I get this error: 292 tests, 350 assertions, 2 failures, 13 errors rake aborted! Command failed with status (1): [/usr/local/bin/ruby -I"lib:test" "/ usr/loc...] This error just showed up yesterday --- I have no idea how I caused it. Here is my gem list in case that helps: actionmailer (2.3.2, 2.2.2) actionpack (2.3.2, 2.2.2) activerecord (2.3.2, 2.2.2)
2011 Aug 25
3
ActiveRecord searching in batch (with find_by_sql)
I have an issue where I am getting a large number of records from the database and I cant afford to keep it in the memory due to performance issues. Therefore using the following would be ideal, User.find_each(:batch_size => 5000, :start => 2000) do |user| NewsLetter.weekly_deliver(user) end however, I would like to use find_by_sql since my query is user defined. Question is, is it
2012 Jul 31
1
puppet doc questions
Does puppet doc require a specific version of any gems (such as rdoc or rake) to operate? I''m getting some errors when I try to generate my rdoc now. # puppet doc --output /var/www/test --modulepath /etc/puppet/environments/test/modules -m rdoc RDoc::RDocError is deprecated and will be removed in RDoc 4 Could not generate documentation: uninitialized constant RDoc::RDoc::Generator
2006 Feb 28
1
Working with date_select ...
I am a little confused about the best way to work with date_select. I see that in my views it generates a simple input form that allows for the entry of year, month and date information. If I just leave it at that, great! But what if now in the controller, I want to work with the date information. I actually want to take the user input date and compute a new date some number of days in the
2008 Mar 02
0
Models are not initialised correctly with ''rake test'' in Merb 0.9.1
I''m using Sequel as my ORM and Test::Unit as my testing framework and have the following model: class Item < Sequel::Model validates do presence_of( :name, :uuid, :vendor_id, :vendor_reference, :amount, :currency_code ) uniqueness_of( :uuid ) end def initialize( *args ) super( *args ) self.uuid = UUID.random_create.to_s end end As you can see I overwrite