email column not unique

If you get an ActiveRecord::RecordNotUnique Error you probably have an user-management with devise in service.

Devise generates a fixture in test/fixtures with this content:


one: {}
# column: value
#
two: {}
#column: value
This fixture tries to create two users with the same emailaddress.
If you replace it with that:

one:
email: aaa@bbb.cc
# column: value
#
two:
email: bbb@ccc.co
#column: value
everything would be fine


jens | show | 09.12.2014 11:27

annuntio vobis ...

I announce you a great joy: We have a website!
Not really new, with no doubt, but in its new attire:
kuratorium

jens | show | 01.05.2014 12:13

tomcat with java 1.7

On a ubuntu machine checkout your JAVA_HOME


echo $JAVA_HOME
/usr/lib/jvm/java-1.7.0-openjdik-amd64/

and then edit /etc/default/tomcat7:

JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdik-amd64/

jens | show | 10.03.2014 10:40

database.properties example

src/main/resources/database.properties

jdbc.driver=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/<db_name>
jdbc.username=<username>
jdbc.password=<password>

src/main/java/dao/DataSource.java

... read more

jens | show | 22.02.2014 07:38


© service - b.org 2012