redmine_ultraviolet icon indicating copy to clipboard operation
redmine_ultraviolet copied to clipboard

the plugin can not support the remdine 1.4.X

Open archonwang opened this issue 12 years ago • 8 comments

when I use the plugin to preview the code ,it shows erro.

ArgumentError in Repositories#entry

Showing vendor/plugins/redmine_ultraviolet/app/views/common/_file.rhtml where line #15 raised:

Output for xhtml is not yet implemented

Extracted source (around line #15):

12: 13: 14:

15: <%= syntax_highlight( filename, Redmine::CodesetUtil.to_utf8_by_setting(content) ) %> 16:
17: 18: <% content_for :header_tags do %>

Trace of template inclusion: app/views/repositories/entry.html.erb

RAILS_ROOT: C:/Rails_Prj/Redmine14

the information is :

/////////////////////////////////////////////////////////// Processing RepositoriesController#entry (for 127.0.0.1 at 2012-04-25 15:16:25) [ GET] Parameters: {"action"=>"entry", "controller"=>"repositories", "id"=>"demoproject", "path"=>["trunk", "Google_APP_SN.txt"], "rev"=>"2"} Rendering template within layouts/base Rendering repositories/entry

ActionView::TemplateError (Output for xhtml is not yet implemented) on line #15 of vendor/plugins/redmine_ultraviolet/app/views/common/_file.rhtml: 12: 13: 14:

15: <%= syntax_highlight( filename, Redmine::CodesetUtil.to_utf8_by_setting(content) ) %> 16:
17: 18: <% content_for :header_tags do %>
ultraviolet (0.10.2) lib/uv.rb:69:in `parse'
vendor/plugins/redmine_ultraviolet/app/views/common/_file.rhtml:15:in `_run_

rhtml_vendor47plugins47redmine_ultraviolet47app47views47common47_file46rhtml_locals_content_file_filename_object' app/views/repositories/entry.html.erb:11

Rendering rescues/layout (internal_server_error) ///////////////////////////////////////////////////////

archonwang avatar Apr 25 '12 07:04 archonwang

Hmmm.. not sure why it says it doesn't support xhtml. That's the default output format for ultraviolet. Maybe you could try changing it to "html"? Here's how...

Edit redmine_ultraviolet/lib/ultraviolet_syntax_patch.rb, and change line 101, which reads:

return Uv.parse(content, "xhtml", syntax_name, true, @uv_theme_name)

to:

return Uv.parse(content, "html", syntax_name, true, @uv_theme_name)

epitron avatar Apr 25 '12 07:04 epitron

maybe in bundle, it could not support xhtml? I am not sure. anyone have any idea?

archonwang avatar Apr 25 '12 09:04 archonwang

I believe I am the only one here. Also, this is an Ultraviolet error.

Which gem are you using? 'uv', or 'ultraviolet'?

epitron avatar Apr 25 '12 19:04 epitron

I used ultraviolet (0.10.2)

archonwang avatar Apr 26 '12 01:04 archonwang

Try 'uv'.

epitron avatar Apr 26 '12 03:04 epitron

I not sure .for my ruby is 1.8.7

uv need ruby 1.9 +

archonwang avatar Apr 26 '12 03:04 archonwang

I had this same problem on 1.4.4. I installed ultraviolet with gem install ultraviolet, added a Gemfile to the plugin with gem "ultraviolet" and then bundle install --local. Works.

nickcaballero avatar Jul 17 '12 01:07 nickcaballero

The Gemfile was actually added in most of the forks. Maybe pull?

nickcaballero avatar Jul 17 '12 01:07 nickcaballero