[Radiant] Extension problems: create model and rake db:migrate
Sean Cribbs
seancribbs at gmail.com
Tue Apr 3 10:30:00 CDT 2007
First problem:
There are currently no generators for extension
models/controllers/migrations/etc. You will have to make them manually,
although even that doesn't take too much work.
That said, it sounds like either 1) you have installed Radiant from the
gem without unpacking or 2) something else is messed up with the
paths/configuration/etc.
Second problem:
If your migration is properly in the db/migrate directory of your
extension, then run `rake db:migrate:extensions`. That should do it.
Sean
Fabrizio Taddei wrote:
> 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
> <%20http://us.rd.yahoo.com/mail/it/taglines/hotmail/nowyoucan/nextgen/*%20http://it.docs.yahoo.com/nowyoucan.html>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Radiant mailing list
> Post: Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20070403/f88edf0d/attachment.html
More information about the Radiant
mailing list