Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Home

jdallien edited this page · 3 revisions
Clone this wiki locally

Troubleshooting

Error after upgrading to version 2.0.0 if you use uuid for primary keys in rails

If you are using UUIDTools for unique ids for your objects and you followed a tutorial like this one, then you may be surprised by this error:


  undefined method `timestamp_create' for UUID:Class

after upgrading. You should edit uuid_helper.rb in your app/helpers directory and replace this line:


    self.id = UUID.timestamp_create().to_s

by the following one


    self.id = UUIDTools::UUID.timestamp_create().to_s

so it might look like this:


require 'rubygems'
require 'uuidtools'
module UUIDHelper
  def before_create()
    self.id = UUIDTools::UUID.timestamp_create().to_s
   end
end
Something went wrong with that request. Please try again.