Hi, I would like to develop Redmine plugins using hobo. I have developed some of them without using Hobo, but I would like to take profit of Hobo.
These are the results of some investigations: 1. *********** Redmine allow adding gems hobo_support and hobo_fields without problems. Adding hobo or hobo_rapid throws an error. --------------- Started GET "/" for 127.0.0.1 at 2013-12-06 17:53:10 +0000 Processing by WelcomeController#index as HTML Current user: txinto (id=3) Redirected to http://localhost:3003/projects/gatatac-web/wiki/Wiki Filter chain halted as :forward_to_startpage rendered or redirected Completed 302 Found in 58.5ms (ActiveRecord: 4.8ms) Started GET "/projects/gatatac-web/wiki/Wiki" for 127.0.0.1 at 2013-12-06 17:53:10 +0000 Processing by WikiController#show as HTML Parameters: {"project_id"=>"gatatac-web", "id"=>"Wiki"} Current user: txinto (id=3) DRYML: Compiled /home/txinto/.rvm/gems/ruby-2.0.0-p247/gems/dryml-2.0.1/taglibs/core.dryml in 0.08s Completed 500 Internal Server Error in 255.7ms Dryml::DrymlException (No such taglib: taglibs/application {:src=>"taglibs/application", :template_dir=>".", :source_template=>""}): config/initializers/10-patches.rb:51:in `block in find_all' config/initializers/10-patches.rb:46:in `find_all' app/controllers/wiki_controller.rb:97:in `show' ------------------ Any information about solving this is welcome ;o) 2. ************* I managed to develop models using hobo and doing migrations, but there is problem with the different directories: * When generating hobo_migration at rails def self.down change_column :queries_roles, :query_id, :integer, :null => falseroot, tries to drop all the plugin tables (the plugins are in plugins/name_of_plugin/ directories, each plugin contains its own migrations, models, etc. * It also wants to change all the *_id files to add a size limitation to 4 bytes. ----------- def self.up change_column :queries_roles, :query_id, :integer, :limit => 4, :null => true .... def self.down change_column :queries_roles, :query_id, :integer, :null => false -------------- I solve this making a first migration at the rails directory level without dropping any plugin tables and forcing these :limit changes. After that, on each hobo_migrations I have just to ignore all drop questions. 3. ***************** The way I managed to make Hobo useful is to generate the new plugin model at the rails level and then to move everything to plugin directory * I generate (and don't migrate) the migration. * I move all the generated files to plugins/my_plugin/ respective directories (test, db/migrate, models). ** I have to change the "require" sentence of the unit test to require File.expand_path('../../test_helper', __FILE__) After that, everything works (please remember hobo_rapid is not included, so no views are available). I can even execute the plugin migrations redmine migrations as usual. 4. ******************* I think that would be fantastic to introduce two options in the hobo generators: * Hobo migration should "add" all the plugin migration files to the rails migrations before evaluating the changes to be done to the database (this will avoid trying to drop plugin tables). * Hobo generators should have a way to determine the base directory for the generated model (f.i. a plugin in Rails is a subdirectory on the rails root, and a plugin on redmine is a subdirectory in the plugins folder). Again, any information about how to make this is welcome. Thanks a lot for your attention and for your support. Best regards. Tx. -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/groups/opt_out.
