[Radiant] Extension problems: create model and rake db:migrate
Fabrizio Taddei
fabrizio_taddei at yahoo.it
Mon Apr 2 11:36:43 CDT 2007
Hi everybody,
I'm trying to develop my first radiant extension, and I've found two problems.
I'll try to describe this problems.
First problem:
After that I've created my extension running "ruby script/generate extension xbrlink", I've tried to create a model running "ruby script/generate model link" and I've got back this message in the console:
D:\ProveRails\xbrail>ruby script/generate model link
Couldn't find 'model' generator
I've solved this problem adding in the folder D:\ProveRails\xbrail\script a file called "generate_model" that contains this script:
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate'
Now typing the command "ruby script/generate extension...", ruby creates the extension correctly, and if I type "ruby script/generate_model model / controler..." ruby creates models or controllers correctly.
Is this a good solution or it might causes some other problems?
Second problem:
After that I've created the model called "link", I've edited the migration file 001_create_links.rb, to create the links table in my database.
When I run the "rake db:migrate" command in the root folder nothing happens, there isn't the table in the database and I don't have any error message in the console. The same thing happens if I run the command in the extensions folder.
This is the console output:
D:\prove_rails\xbrail>rake db:migrate
(in D:/prove_rails/xbrail)
D:\prove_rails\xbrail>
Any suggestions?
Thaks everybody.
Taddei Fabrizio
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
http://it.docs.yahoo.com/nowyoucan.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20070402/8b632f15/attachment.html
More information about the Radiant
mailing list