I am trying to install user_engine, but am unable to get the rake
commands to work.
For example, when I run rake bootstrap I get the following error:
rake aborted!
PGError: ERROR: relation “permission” does not exist
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
d.adsrc, a
.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = ‘permission’::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
I know that there is no table called “permission” because the table is
called “permission_table” as specified in the Permission model class:
This doesn’t mean the table is actually called “permission_table”;
rather that it uses the value stored in the CONFIG for the UserEngine
with the key :permission_table. The defaults are ‘permission’ or
‘permissions’ (depending on whether or not you’ve turned on
pluralisation. Unless, of course, you’ve set this explicitly - it
wasn’t clear in your post.
Assuming that you didn’t specify any custom table names, what tables
do you have in your database?
I was unable to get the migrate scripts to work and therefore created
the
tables by hand. However being new to Ruby and Rails I mistakenly thought
that the table was called permission_table not permission or permissions
and
set the table up accordingly.
I guess I should have asked for input on why I couldn’t get the migrate
scripts to work, so I will ask that now.
I tried to set up the database by running “rake engine_migrate
ENGINE=login”
and “rake engine_migrate ENGINE=user” from the root directory of my
project,
but received the following output:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\radrails-projects\PhicorpBooking>rake engine_migrate ENGINE=login
(in C:/radrails-projects/PhicorpBooking)
The db/migrate directory for engine ‘login_engine’ appears to be
missing.
Should be:
C:/radrails-projects/PhicorpBooking/config/…/C:/radrails-projects/Ph
icorpBooking/config/…/vendor/plugins/login_engine/db/migrate
C:\radrails-projects\PhicorpBooking>rake engine_migrate ENGINE=user
(in C:/radrails-projects/PhicorpBooking)
The db/migrate directory for engine ‘user_engine’ appears to be missing.
Should be:
C:/radrails-projects/PhicorpBooking/config/…/C:/radrails-projects/Ph
icorpBooking/config/…/vendor/plugins/user_engine/db/migrate
Could you tell me why I received the above output, and how the schema.rb
file in db directory is used (I have done nothing with the two schema.rb
files)?
Many thanks,
Bruce.
----- Original Message -----
From: “James A.” [email protected]
To: “Discussion of the use of existing Engines” [email protected]
Sent: Monday, January 30, 2006 4:48 AM
Subject: Re: [Engine-users] user_engine installation problem
I tried to set up the database by running “rake engine_migrate ENGINE=login”
C:/radrails-projects/PhicorpBooking/config/…/C:/radrails-projects/Ph
file in db directory is used (I have done nothing with the two schema.rb
Sent: Monday, January 30, 2006 4:48 AM
Could you tell me why I received the above output, and how the schema.rb
file in db directory is used (I have done nothing with the two schema.rb
files)?
This is a bug in Engine’s rake file, which mistakenly adds two
RAILS_ROOT to the path (as you can see).
Piotr
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.