ande3577 / redmine_issue_mailer

Allow sending a redmine issue via e-mail.
GNU General Public License v3.0
2 stars 1 forks source link

Syntax error in routes.rb #4

Open maohsama opened 10 years ago

maohsama commented 10 years ago

I can't install the plugin. When I migrate the plugins using "rake redmine:plugins:migrate RAILS_ENV=production" I get a syntax error : An error occurred while loading the routes definition of redmine_issue_mailer plugin (.../plugins/redmine_issue_mailer/config/routes.rb): (eval):4: compile error (eval):4: syntax error, unexpected ':', expecting $end get '/issues/:id/share', to: 'issue_emails#new'

maohsama commented 10 years ago

adding '=>' and changing to: to :to solved the problem:

get '/issues/:id/share', :to => 'issue_emails#new' post '/issues/:id/share', :to => 'issue_emails#create' get '/issues/:id/share/users', :to =>'issue_emails#users' post '/issues/:id/share/add_users', :to => 'issue_emails#add_users'

ande3577 commented 10 years ago

What version of redmine is this occurring on?

ande3577 commented 10 years ago

Also ruby version, thanks.

maohsama commented 10 years ago

Environment: Redmine version 2.3.1.stable Ruby version 1.8.7 (i486-linux) Rails version 3.2.13 Environment production Database adapter MySQL

Then I got another error, when going to the issue mailer form:

SyntaxError (/var/www/htdocs/support/plugins/redmine_issue_mailer/app/controllers/issue_emails_controller.rb:47: syntax error, unexpected ':', expecting '}' format.js { render layout: false } ^):

which is fixed by changing to: format.js { render :layout=> false }

then I got an Error, when sending the issue mail: NoMethodError (undefined method no_self_notified=' for #<UserPreference:0xb4b840ac>): app/models/mailer.rb:427:ininitialize' app/models/mailer.rb:440:in `method_missing'

Then I gave up.

ande3577 commented 10 years ago

Thanks. That confirms that the error is due to the use of 1.9 hash syntax. I will convert it to 1.8 compatibile syntax.

ande3577 commented 10 years ago

I have attempted to revert all usage of 1.8 has syntax in 4b6566124ca49d95fc204d1513126abafc029c33.

Hopefully this will resolve both of these issues.