geron-cn / redmine_process_frameworks

To put Process Framework into practice as a plugin for redmine
http://202.202.11.125/pub_redmine/projects/framework
4 stars 4 forks source link

Missing import_templates #1

Open jpoa opened 12 years ago

jpoa commented 12 years ago

Greetings!

I think that in the last version its missing the file

libs/taks/import_templates.rake

I've successfully loaded the inital commit imported the plugin ( rake db:migrate_plugins RAILS_ENV=production ) and got this:

root@angelos:/opt/redmine# rake ProcessFramework:import_templates RAILS_ENV=production Please install RDoc 2.4.2+ to generate documentation. import model:

需求工程推荐模板

succeed! import file: /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/SREP.xml succeed! imort /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/SREP.xmlis done! import model:

需求工程推荐模板

succeed! import file: /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/需求工程.xml succeed! imort /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/需求工程.xmlis done! import is done!

Which I believe loaded everything needed, however when opening the "Process Framework" tab i get an error:

ActionView::TemplateError (No route matches {:controller=>"init_select", :project_id=>#<Project id: 36, name: "Test", description: "", homepage: "", is_public: false, parent_id: nil, created_on: "2012-05-16 10:24:35", updated_on: "2012-05-16 10:24:35", identifier: "test", status: 1, lft: 65, rgt: 66, if_config_pf: false, model_id: nil>, :action=>"import_process_framework"}) on line #3 of vendor/plugins/redmine_process_frameworks/app/views/init_select/select_models.html.erb: 1: <%= stylesheet_link_tag "/plugin_assets/redmine_process_frameworks/stylesheets/model_attribute.css" %> 2:

3: <% form_tag({:controller => "init_select", :action => "import_process_framework", :project_id => @project}, 4: {:multipart => true} ) do %> 5: <%= file_field_tag "xml_file" %> 6: <%= submit_tag "#{l(:label_import_process_framework)}" %>

vendor/plugins/redmine_process_frameworks/app/views/init_select/select_models.html.erb:3
vendor/plugins/redmine_process_frameworks/app/controllers/init_select_controller.rb:22:in `select_models'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /opt/redmine/public/500.html (500 Internal Server Error)

Any ideas?

This is on Redmine 1.4.2 over Debian 6.

jpoa commented 12 years ago

One update, when going through administration, process framework, I get this:

ActionView::TemplateError (No route matches {:"process_model[move_to]"=>"highest", :id=>#<ProcessModel id: 1, name: "需求工程11", description: "

需求工程推荐模板

\n", date: "2012-05-16 10:21:17", author_id: 4, position: 1>, :action=>"sort_model"}) on line #33 of vendor/plugins/redmine_process_frameworks/app/views/admin_process_models/_index.rhtml: 30: <%= link_to l(:version_status_open), {:action => 'open_close_model',:elem => list}, :class => 'icon icon-unlock'%> 31: <%else %> 32: 33: <%= reorder_links('process_model', {:action =>'sort_model',:id=> list})%> 34: 35: 36: <%= link_to l(:version_status_closed), {:action => 'open_close_model',:elem => list}, :class => 'icon icon-lock' %>

app/helpers/application_helper.rb:417:in `reorder_links'
vendor/plugins/redmine_process_frameworks/app/views/admin_process_models/_index.rhtml:33:in `_run_rhtml_vendor47plugins47redmine_process_frameworks47app47views47admin_process_models47_index46rhtml_locals_index_object_tab'
vendor/plugins/redmine_process_frameworks/app/views/admin_process_models/_index.rhtml:18:in `each'
vendor/plugins/redmine_process_frameworks/app/views/admin_process_models/_index.rhtml:18:in `_run_rhtml_vendor47plugins47redmine_process_frameworks47app47views47admin_process_models47_index46rhtml_locals_index_object_tab'
app/views/common/_tabs.html.erb:24
app/views/common/_tabs.html.erb:23:in `each'
app/views/common/_tabs.html.erb:23
app/helpers/application_helper.rb:231:in `render_tabs'
vendor/plugins/redmine_process_frameworks/app/views/admin_process_models/index.rhtml:3:in `_run_rhtml_vendor47plugins47redmine_process_frameworks47app47views47admin_process_models47index46rhtml'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /opt/redmine/public/500.html (500 Internal Server Error)

geron-cn commented 12 years ago

ok, thank you, I will check it soon and reply.

2012/5/16 jpoa < reply@reply.github.com

Greetings!

I think that in the last version its missing the file

libs/taks/import_templates.rake

I've successfully loaded the inital commit imported the plugin ( rake db:migrate_plugins RAILS_ENV=production ) and got this:

root@angelos:/opt/redmine# rake ProcessFramework:import_templates RAILS_ENV=production Please install RDoc 2.4.2+ to generate documentation. import model:

矜헹묏넋股수친겼

succeed! import file: /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/SREP.xml succeed! imort /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/SREP.xmlis done! import model:

矜헹묏넋股수친겼

succeed! import file: /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/矜헹묏넋.xml succeed! imort /opt/redmine/vendor/plugins/redmine_process_frameworks/lib/tasks/../templates/矜헹묏넋.xmlis done! import is done!

Which I believe loaded everything needed, however when opening the "Process Framework" tab i get an error:

ActionView::TemplateError (No route matches {:controller=>"init_select", :project_id=>#<Project id: 36, name: "Test", description: "", homepage: "", is_public: false, parent_id: nil, created_on: "2012-05-16 10:24:35", updated_on: "2012-05-16 10:24:35", identifier: "test", status: 1, lft: 65, rgt: 66, if_config_pf: false, model_id: nil>, :action=>"import_process_framework"}) on line #3 of vendor/plugins/redmine_process_frameworks/app/views/init_select/select_models.html.erb: 1: <%= stylesheet_link_tag "/plugin_assets/redmine_process_frameworks/stylesheets/model_attribute.css" %> 2:

3: <% form_tag({:controller => "init_select", :action => "import_process_framework", :project_id => @project}, 4: {:multipart => true} ) do %> 5: <%= file_field_tag "xml_file" %> 6: <%= submit_tag "#{l(:label_import_process_framework)}" %>

vendor/plugins/redmine_process_frameworks/app/views/init_select/select_models.html.erb:3

vendor/plugins/redmine_process_frameworks/app/controllers/init_select_controller.rb:22:in select_models' /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in process_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in main_loop' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in start_request_handler' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:insafe_fork' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:insend' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in start_synchronously' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in start' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in start' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'

/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in lookup_or_add' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in synchronize' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in synchronize' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in spawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:insend' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in start_synchronously' /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /opt/redmine/public/500.html (500 Internal Server Error)

Any ideas?

This is on Redmine 1.4.2 over Debian 6.


Reply to this email directly or view it on GitHub: https://github.com/geron-cn/redmine_process_frameworks/issues/1

------geron http://geron.heroku.com c.ever.fallen@gmail.comc.ever.fallen@gmail.com

geron-cn commented 12 years ago

I'm sorry for this. But i check in my redmine -v=1.2.1 1.1.3, there's no errors happen. It might be the versions, but finaly ascribe the code is not preciseness enough. But according toanalyzes i thinks they happened in /vendor/plugins/redmine_process_frameworks/config/routes.rb

that should config the more routes in this file:

for example:

map.with_options :controller => 'init_select' do |project|
     project.with_options :conditions => {:method => :post} do |project|
      project.connect 'projects/importmodel', :action =>'import_process_framework'
 end

======>but i haven't test it in 1.4.2, and forgive me that i could not do this job before tomorrow night.

jpoa commented 12 years ago

But of course, no problem, and thank you very much for your support! On May 16, 2012 3:27 PM, "Geron" < reply@reply.github.com> wrote:

I'm sorry for this. But i check in my redmine -v=1.2.1 1.1.3, there's no errors happen. It might be the versions, but finaly ascribe the code is not preciseness enough. But according toanalyzes i thinks they happened in /vendor/plugins/redmine_process_frameworks/config/routes.rb

that should config the more routes in this file:

for example:

map.with_options :controller => 'init_select' do |project| project.with_options :conditions => {:method => :post} do |project| project.connect 'projects/importmodel', :action =>'import_process_framework' end

======>but i haven't test it in 1.4.2, and forgive me that i could not do this job before tomorrow night.


Reply to this email directly or view it on GitHub:

https://github.com/geron-cn/redmine_process_frameworks/issues/1#issuecomment-5740733

geron-cn commented 12 years ago

these days i install ruby 1.9.2 rails 3.2.3 and gem list for redmine1.4.2:

actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activerecord-jdbc-adapter (1.2.2)
activerecord-jdbcmysql-adapter (1.2.2)
activeresource (3.2.3)
activesupport (3.2.3)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.3)
coderay (1.0.6)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.3.2)
hike (1.2.1)
i18n (0.6.0)
jdbc-mysql (5.1.13)
journey (1.0.3)
jquery-rails (2.0.2)
json (1.7.3)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.18)
mocha (0.11.4)
multi_json (1.3.5)
mysql2 (0.3.11, 0.3.7)
net-ldap (0.3.1)
pg (0.13.2)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (0.9.2.2)
rdoc (3.12)
rmagick (2.13.1)
ruby-openid (2.1.8)
rubygems-bundler (0.9.2)
rvm (1.11.3.3)
sass (3.1.18)
sass-rails (3.2.5)
shoulda (2.11.3)
sprockets (2.1.3)
sqlite3 (1.3.6)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.4)

but i find two problems becase of the versions (and i don't know how do you resovle them);

  • ruby 1.9.2: iteration, maybe it should be array.map do |arr|
/workspace/Ruby/redmine_1.4.2$ rake redmine:plugins:migrate
rake aborted!
/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/lib/tasks/import_templates.rake:6: syntax error, unexpected tASSOC, expecting ')'
  task (:import_templates  => :environment) do 
                             ^
/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/lib/tasks/import_templates.rake:8: syntax error, unexpected keyword_do_block, expecting keyword_end
    FileList[file_dir].each do |xml_file| 
                              ^
/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/lib/tasks/import_templates.rake:13: syntax error, unexpected keyword_do_block, expecting keyword_end
      doc.elements.each("process_model") do |e| 
                                           ^
/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/lib/tasks/import_templates.rake:25: syntax error, unexpected keyword_do_block, expecting keyword_end
          activies.each do |acty|
                          ^
/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/lib/tasks/import_templates.rake:35: syntax error, unexpected keyword_do_block, expecting keyword_end
            actions.each do |acns|
                           ^
/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/lib/tasks/import_templates.rake:45: syntax error, unexpected keyword_do_block, expecting keyword_end
              tasks.each do |task|
                           ^
/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/lib/tasks/import_templates.rake:55: syntax error, unexpected keyword_end, expecting $end
          end
  • rails 3.2.3: that becase of the router DSL
~/workspace/Ruby/redmine_1.4.2$ rake redmine:plugins:migrate
An error occurred while loading the routes definition of redmine_process_frameworks plugin (/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/config/routes.rb): uninitialized constant ActionDispatch::Routing::Routes.
~/workspace/Ruby/redmine_1.4.2$ rake db:migrate_plugins
An error occurred while loading the routes definition of redmine_process_frameworks plugin (/home/geron/workspace/Ruby/redmine_1.4.2/plugins/redmine_process_frameworks/config/routes.rb): You are using the old router DSL which has been removed in Rails 3.1. Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/.
geron@Inspiron:~/workspace/Ruby/redmine_1.4.2$ rails -v
Rails 3.2.3

*\ and this plugin for redmine has been defined to fit 1.1.x, 1.2.x, 1.3.x , and i think it hard to suit 1.4.x.

jpoa commented 12 years ago

Ok, thank you very much for your help nonetheless!

geron-cn commented 12 years ago

Now it support 1.4.x, 2.0.x.

Best regards.

Weibo: @k-never-ever http://weibo.com/kfalling Blog: http://geron.heroku.com Geron: c.ever.fallen@gmail.com c.ever.fallen@gmail.com

devaroop commented 10 years ago