similar to: Problem with UUID generated in partial not being unique

Displaying 20 results from an estimated 800 matches similar to: "Problem with UUID generated in partial not being unique"

2013 Oct 25
6
Migrate postgresql database to uuid
Hi all, I am using rails 3.1 and ruby 1.9.3,Now i want to use uuid concept in rails 3 for existing data so i did like :- create_table :posts, :id => false do |t| t.string :uuid, :limit => 36, :primary => true end ActiveRecord::Base.class_eval do # old rails versions set_primary_key ''uuid'' before_create :generate_uuid def generate_uuid self.id =
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
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
2007 May 25
6
IBM Article: DB2 on Rails
I often forward IBM DeveloperWorks articles about RoR to this list. This is a new well-written ''Intermediate'' article using DB2 with Rails: http://www.ibm.com/developerworks/db2/library/techarticle/dm-0705chun/ Hope this helps. Cheers Mohit. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
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
2008 Jul 05
5
Does RSpec work nicely with UUID primary keys?
I have my application happily generating UUID primary keys using the uuidtools gem. But the auto-generated specifications created by "script/generate rspec_scaffold...", etc, assume that one is using a sequential integer primary key. For those who have hit this same issue, is it just a matter of rewriting the auto-generated specifications to take this into account, or does one have to
2001 Sep 03
2
ext3 and df don't agree ?
I've taken my RH7.1 system, rebuild kernel (2.4.9 with ext3 patches) and followed the ext3 instructions to install. Everything seems to work OK but - df -k doesn't list the ext3 partition (my root partition). Is this a known problem ? If not, how best can I gather diagnostics to identify the source of the problem ? Thanks -- Philip Nelson (teamdba@bojnice.com)
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
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)
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
2005 Nov 02
1
Windows, Segmentation Faults, config.load_paths and config.cache_classes
I am doing some testing with the rails trunk, version I switched to because of memory leaks in 0.13.1 under linux environment. Right now the application is running fast and steady under linux, with no memory leaks using SCGI Rails Runner 0.4.3 from Zed, BUT it has become unusable under Windows (our main development environment) where I am getting a lot of segmentation faults. BUT the problem
2007 Nov 13
16
mongrel startup fails now: already initialized constant OPTIONS
I updated to ruby 1.8.6p111 last night and updated some gems and now mongrel doesn''t work: MacOS 10.4.10 $ ruby --version ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin8.10.1] $ gem list rails *** LOCAL GEMS *** rails (1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.6) Here''s a simple test: $ rails test5 create ... $ cd test5 $ script/server => Booting
2007 Apr 11
12
redirection doesn''t get detected well?
I''m doing a redirect in one of my controller actions and somehow I can''t spec it, see this pastie: http://pastie.caboo.se/53120. When following the link from a browser I''m being redirected to the right page. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Sep 27
3
having some issues with factory_girl and bundler...
Hi All Need some brilliants minds here :) I''m using Rails 2.3.8 & ruby 1.8 (I know, I know... ) I''ve move my gems from .gems to Bundler, but I''m having some issues with Factory_girl when I rake spec "uninitialized constant Factory" I''m following the instructions from http://gembundler.com/rails23.html. Basically: - grab all config.gem and place
2009 Jan 29
2
HOWTO install webgen 0.5.6 on Debian GNU/Linux etch
Hi all, Cristian our sys-admin wrote a short HOWTO for Webgen 0.5.6 on Debian Etch, see https://wiki.fsfe.org/FellowshipHacks/Webgen. I thought it might be of interest for others as well. If you know a better way, please let us know. Best wishes, Matthias -- Deputy German Coordinator, Fellowship Coordinator Free Software Foundation Europe (FSFE) [] (http://fsfeurope.org) Join the
2006 Aug 18
4
Database Triggers?
Hi, I''m new to RoR and exploring its use with an existing application. One thing I can''t seem to find much detail on is using database triggers. All RoR examples and tutorials I''ve seen are very basic saving data back to a single table. My use case includes a somewhat denormalized DB that uses triggers to store data in multiple tables on occassion. I currently
2008 Jan 18
5
How do I pass form values from POST controller specs?
Hi there I just started my first Merb app and I''m running into some weird things in Specs. When I do: describe "create action" do it "should create a new project" do project_params = {:name => ''bekkunin''} Project.should_receive(:create).with(project_params) controller, action = post(''/projects'', :project
2019 May 20
1
WISH: Built-in R session-specific universally unique identifier (UUID)
# Proposal Provide a built-in mechanism for obtaining an identifier for the current R session, e.g. > Sys.info()[["session_uuid"]] [1] "4258db4d-d4fb-46b3-a214-8c762b99a443" The identifier should be "unique" in the sense that the probability for two R sessions(*) having the same identifier should be extremely small. There's no need for reproducibility, i.e.