| Message: 10220 |
 |
BY: Arne Pfeilsticker (arne) DATE: 2006-06-13 09:46 SUBJECT: RE: Initial Setup Problems Mark,
I had the same problem!
I don’t think it was the database configuration. You only have to create the new schema apptrain_development and apptrain_test.
I rather think you have to have RbYAML-0.0.2 properly installed. Also check your /db/*.yml files. You need apps.yml, datatypes.yml, permissions.yml and relationship_types.yml. They contain methadata.
I also had the feeling that RbYAML doesn’t like tabs instead of spaces. I also inserted ~ as a null value.
File apps.yml:
---
- !ruby/object:App
attributes:
name: sandbox
id: "1"
is_registered: ~
In addition to that I inserted the app_administrators.yml:
---
- !ruby/object:AppAdministrator
attributes:
id: 1
app_id: 1
user_id: 1
and users.yml:
---
- !ruby/object:User
attributes:
id: 1
login: larry
email: lfortnoy@yahoo.com
salt: 62a636a58d0648eadf7410aa2e4444866174c96e
#crypted_password: <%= Digest::SHA1.hexdigest('quentin') %>
crypted_password: be61f3ff72492591afe5081857a8ff17a85b21f9 # quentin
#crypted_password: "ce2/iFrNtQ8=\n" # quentin, use only if you're using 2-way encryption
created_at: <%= 5.days.ago.to_s :db %>
activated_at: <%= 5.days.ago.to_s :db %> # only if you're activating new signups
- !ruby/object:User
attributes:
id: 2
login: arthur
email: arthur@example.com
salt: 55bc51360864c82dcd7ff4bcfec56a8d8e79e751
crypted_password: 37ba966058c6f39162e5b537adb516af91cd1fe6 # arthur
activation_code: arthurscode # only if you're activating new signups
created_at: <%= 1.days.ago.to_s :db %>
in order to logon as an administrator.
On top of that, I had to commend out line 90 in \lib\tasks\rails\import_app.rake due to an error message saying that record already exeists:
def load_from_yaml(yaml_file,app,obj,save_id = true)
p "yo"
if File.exists?(yaml_file) && File.size?(yaml_file)
records = YAML::load( File.open(yaml_file))
records.each do |record|
new_obj = nil;
p obj
eval ("new_obj = #{obj.camelize}.new(record.attributes)")
new_obj.id = record.id if save_id
# For Single Table Inheritance
klass_col = record.class.inheritance_column.to_sym
if record[klass_col]
new_obj.type = record[klass_col]
end
# line 90: new_obj.save
end
end
end
I think it might be a good idea that you write down all the obstacles and the solutions to them.
Arne
| |