Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to use with Redmine 2 #15

Open
kevinff opened this issue Jun 27, 2012 · 4 comments
Open

Way to use with Redmine 2 #15

kevinff opened this issue Jun 27, 2012 · 4 comments

Comments

@kevinff
Copy link

kevinff commented Jun 27, 2012

Hello!

I tried to install your plugin with Redmine 2, and it's incompatible :(

I had to comment some "require" in init.rb and also in routes.rb:
replace
ActionController::Routing::Routes.draw do |map|
with
RedmineApp::Application.routes.draw do

However there isn't any "map" for the routes, see also http://www.redmine.org/boards/2/topics/31460

And i'm quite stuck :(

Any idea?

Thanks!

@kevinff
Copy link
Author

kevinff commented Jun 27, 2012

OK now i triggered this error:

An error occurred while loading the routes definition of redmine_http_auth plugin (/**********/plugins/redmine_http_auth/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/.

And that page says a lot. This one too: http://www.redmine.org/boards/3/topics/31445

Tried:

RedmineApp::Application.routes.draw do
match 'httpauth-login', :to => 'welcome#index', :via => [:get, :post]

match 'httpauth-selfregister/:action', :to => 'registration#autoregistration_form', :via => [:get, :post]
end

But doesn't work, maybe because i commented the require of auth-patch, don't know how to make it work. Sorry first time using ruby, rails and redmine :>

@kevinff
Copy link
Author

kevinff commented Jun 27, 2012

Ok quick hack i put the helper and the lib in the redmine lib folder, now i can include the auth patch.

Fixed another problem with my apache config, and now works! Dirty but works, i forked it, hope it helps somebody until one wants to make this more clean :)

@mattwwarren
Copy link

@kevinff can you post your entire solution? I'm trying to get this working for redmine2 as well and not having much luck.

Thanks.

@kevinff
Copy link
Author

kevinff commented Dec 27, 2012

Sorry Matt, i didn't see your answer.

In my profile i forked it and applied some hacks. I'm not a ruby coder so it's purely a hack.

There's another issue where somebody published a patch:
#18

It's certainly better than mine, if it doesn't work, try mine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants