redmine-cas-plugin icon indicating copy to clipboard operation
redmine-cas-plugin copied to clipboard

Missing partial settings-cas/settings

Open leitonet opened this issue 12 years ago • 4 comments

Hi, I followed #2 Issue renaming folder /redmine-cas-plugin/app/views/settings/ to /redmine-cas-plugin/app/views/settings-cas/

and then changing code at line 30 of lib/redmine_cas.rb:

settings :default => { :enabled => false, :cas_base_url => 'https://localhost', :login_without_cas => false, :auto_create_users => false, :auto_update_attributes_on_login => false, :cas_logout => true }, :partial => 'settings-cas/settings'

but when I click "Configure..." in Administration -> Plugins -> CAS Plugin, it throws the following error:

(Redmine's log):

ActionView::Template::Error (Missing partial settings-cas/settings with {:handlers=>[:rjs, :rsb, :builder, :erb], :locale=>[:es, :en], :formats=>[:html]}. Searched in:

  • "C:/Archivos de programa/BitNami Redmine Stack/apps/redmine/htdocs/app/views" ): 3:
    4: <%= form_tag({:action => 'plugin'}) do %> 5:
    6: <%= render :partial => @partial, :locals => {:settings => @settings}%> 7:
    8: <%= submit_tag l(:button_apply) %> 9: <% end %> app/views/settings/plugin.html.erb:6:in _app_views_settings_plugin_html_erb___109367577_53326092' app/views/settings/plugin.html.erb:4:in_app_views_settings_plugin_html_erb___109367577_53326092'

    I will appreciate any help!! Thanks

leitonet avatar Jul 12 '12 14:07 leitonet

Uhm - that's weird. Did you restart Redmine after applying these changes?

vjt avatar Jul 12 '12 15:07 vjt

vjt, thanks for your reply. I did it, I restarted Redmine, but the error is still there.

Before trying to access the plugin, I had another error that colud be related with this one. When I was doing a "rake db:migrate_plugins RAILS_ENV=production" the rake aborted showing:

uninitialize constant ActionController::Dispatcher in lib/redmine-cas.rb at line 155.

I googled and found that ActionController::Dispatcher now is ActionController::Routing::RouteSet::Dispatcher, so I replaced the line:

ActionController::Dispatcher.to_prepare do

with:

ActionController::Routing::RouteSet::Dispatcher.new do

and rake passed succesfully.

Could it be the cause of the problem? Did I replace correctly this line? As you can see I'm very new in Ruby. I'm using:

  • Redmine 2.0.3
  • Apache 2.2.22
  • ImageMagick 6.5.6-8-Q8
  • MySQL 5.0.83
  • Subversion 1.7.4
  • Ruby 1.8.7-p358-i386-mingw32
  • Rails 2.3.14
  • RubyGems 1.6.2

Any suggestion? Thank you very much

leitonet avatar Jul 13 '12 11:07 leitonet

Hi,

I have set up a new Redmine instance on Rails 2.3.14, added the redmine_cas plugin, renamed vendor/plugins/redmine_cas/app/views/settings into vendor/plugins/redmine_cas/app/views/settings-cas, changed settings/settings into settings-cas/settings at line 30 of vendor/plugins/redmine_cas/lib/redmine_cas.rb, stopped and restarted Redmine and everything worked as expected.

Are you sure you didn't mistype the directory name either when renaming or when amending the redmine_cas.rb file? :)

vjt avatar Jul 13 '12 12:07 vjt

vjt, in my Redmine version I have to deploy all plugins in "redmine/plugins/" directory instead of doing it in "redmine/vendor/plugins/ " I checked out serveral times and there is no mistype (attached 2 images showing directory and code). Any other suggestion? Thanks

On Fri, Jul 13, 2012 at 9:55 AM, Marcello Barnaba < [email protected]

wrote:

Hi,

I have set up a new Redmine instance on Rails 2.3.14, added the redmine_cas plugin, renamed vendor/plugins/redmine_cas/app/views/settings into vendor/plugins/redmine_cas/app/views/settings-cas, changed settings/settings into settings-cas/settings at line 30 of vendor/plugins/redmine_cas/lib/redmine_cas.rb, stopped and restarted Redmine and everything worked as expected.

Are you sure you didn't mistype the directory name either when renaming or when amending the redmine_cas.rb file? :)


Reply to this email directly or view it on GitHub: https://github.com/ifad/redmine-cas-plugin/issues/10#issuecomment-6962153

leitonet avatar Jul 13 '12 14:07 leitonet