hello,
the script seems to be started in development mode (see the line where it says "Loading Rails for development environment..."). you would need to change that to the production environment. for a quick fix: you can change the settings in database.yml to be the same for development as for the production environment. if that does not do the trick, please tell me so i can take a look at the migration script.

regards,
matthias

On 19.05.2008, at 12:58, cam wrote:
Hello all,

I am having trouble getting my 0.10.2 Madeleine-base data migrated to
sqlite on 0.13. I have closely followed the README, the FAQ and found
a few relevant posts on this list but I am unable to get
reset_references to run properly. So far I have successfully managed
to generate the SQL to populate sqlite and it seems to have worked in
that the script threw no errors and I can now see various populated
tables when I mount production.db.sqlite3.

I'd be vastly grateful for any help - I miss the ease of use of
instiki and the info that I have in it is nearly 3 years worth of
personal notes on my various job processes - its invaluable. Failing a
fix for instiki, can anyone point me at something that can convert an
unpacked snapshot to a format that I could import into another wiki or
tool?

Going to the next step of the upgrade process, after sqlite import, to
run rest_references, here's what I'm getting:

-----------------------------------------------
C:\cam\util\instiki-0.13.0>ruby
C:\cam\util\instiki-0.13.0\script\reset_references
Loading Rails for development environment...
The DL driver for sqlite3-ruby is deprecated and will be removed
in a future release. Please update your installation to use the
Native driver.
C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/abstract_adapter.rb:128:in `log': SQLite3::SQL
Exception: no such table: wiki_references: DELETE FROM wiki_references
 WHERE 1=1 (ActiveRecord::StatementInvalid)
from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:145:in `execute' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:346:in `catch_schema_changes' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:145:in `execute' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:155:in `delete' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/base.rb:513:in
`delete_all'
       from C:/cam/util/instiki-0.13.0/script/reset_references:15
-----------------------------------------------

Since I can see there IS a wiki_references table, altho its empty:

-----------------------------------------------
C:\cam\util>sqlite3.exe instiki-0.13.0\db\production.db.sqlite3
"select * from wiki_references"

C:\cam\util>sqlite3.exe instiki-0.13.0\db\production.db.sqlite3
"select * from webs"
1|2005-09-21 12:08:26|2008-05-08 16:23:01|localnotes|localnotes|XXX|
 |false|false|false|textile|008B26|0|false|false
-----------------------------------------------

I thought I would comment out the wiki_references.delete_all call ,
but this only gets me this far:

-----------------------------------------------
C:\cam\util\instiki-0.13.0>ruby
C:\cam\util\instiki-0.13.0\script\reset_references
Loading Rails for development environment...
The DL driver for sqlite3-ruby is deprecated and will be removed
in a future release. Please update your installation to use the
Native driver.
C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection _adapters/abstract_adapter.rb:128:in `log': SQLite3::SQL
Exception: no such table: webs: SELECT * FROM webs
(ActiveRecord::StatementInvalid)
from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:145:in `execute' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:346:in `catch_schema_changes' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:145:in `execute' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/connection_adapters/sqlite_adapter.rb:165:in `select_all' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/base.rb:427:in
`find_by_sql'
from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/base.rb:997:in
`find_every'
from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/base.rb:418:in
`find'
from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/lib/ active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' from C:/cam/util/instiki-0.13.0/vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/deprecation.rb:94:in `find_all'
       from C:/cam/util/instiki-0.13.0/script/reset_references:17

C:\cam\util\instiki-0.13.0>c:\cam\util\sqlite3.exe db \production.db.sqlite3 "select * from webs" 1|2005-09-21 12:08:26|2008-05-08 16:23:01|localnotes|localnotes| password|
   |false|false|false|textile|008B26|0|false|false

-----------------------------------------------

Some diagnostic stuff:

C:\cam\util>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Windows XP SP2

instiki\lib\native\win32 and the directory of my sqlite3.exe are both
on my PATH.

Cheers,
cam

_______________________________________________
Instiki-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/instiki-users

_______________________________________________
Instiki-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/instiki-users

Reply via email to