I set up a repository git in redmine, I have access to some repositories and others not, when I search in the log I get this error.
git log error: git exited with non-zero status: 128
ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
35: <% end -%>
36:
37:
38: <% if #repository.supports_all_revisions? %>
39: | <%= l(:label_revision) %>:
40: <%= text_field_tag 'rev', #rev, :size => 8 %>
41: <% end %>
app/controllers/repositories_controller.rb:125:in `show'
Does anyone have an idea about this error?
Related
I'm trying to implement new redmine and then migrate my data from old redmine to new redmine.
But there is an template error showing in the log
ActionView::Template::Error (undefined method `is_closed?' for nil:NilClass):
6: <h3><%= format_activity_day(day) %></h3>
7: <dl>
8: <% sort_activity_events(#events_by_day[day]).each do |e, in_group| -%>
9: <dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
10: <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
11: <span class="time"><%= format_time(e.event_datetime, false) %></span>
12: <%= content_tag('span', h(e.project), :class => 'project') if #project.nil? || #project != e.project %>
app/models/issue.rb:677:in `closed?'
app/models/issue.rb:57:in `block in <class:Issue>'
I guess this monday is occured when the css is rendered.
Is there any idea about this problem?
or how to log and find the real cause of the problem?
Thanks
I am trying to work with tarnfeld's PusharChat-Rails
I downloaded the file, did the usual bundle install & db:migrate.
I changed the api key in PusherChat-Rails / app / views / layouts / application.html.erb
but I am getting this error
NoMethodError in Chat#view
Showing /Users/gkolan/work/PusherChat/app/views/chat/view.html.erb where line #22 raised:
undefined method `auto_link_urls' for #<#<Class:0x007fdddb772818>:0x007fdddb710230>
Extracted source (around line #22):
19: <ul id="messages">
20: <% #messages.each do |message| %>
21: <% user = ChatUser.find(message.user_id) %>
22: <li<% if user.id == #user.id %> class="you"<% end %>><strong><%= user.nickname %></strong> said:<br><%= auto_link_urls(message.message, { :target => "_blank" }) %></li>
23: <% end %>
24: </ul>
25: <div id="message-overlay"></div>
Rails.root: /Users/gkolan/work/PusherChat
I think its a very simple error. Could you please help me solve this?
Thanks in advance!
The auto_link_urls method has been deprecated for rails >= 3.1.0.
You may :
modify your Gemfile to use 3.0.9
add the rails_autolink gem to your Gemfile
I am using Rails 2.3.11 end the error is:
NoMethodError in Configurations#index
Showing rails/ruby/1.8/gems/actionpack-2.3.11/lib/action_controller/templates/rescues/diagnostics.erb where line #7 raised:
private method `gsub' called for nil:NilClass
Extracted source (around line #7):
4: in <%=h request.parameters['controller'].humanize %>Controller<% if request.parameters['action'] %>#<%=h request.parameters['action'] %><% end %>
5: <% end %>
6: </h1>
7: <pre><%=h #exception.clean_message %></pre>
8:
9: <%= render :file => #rescues_path["rescues/_trace.erb"] %>
10:
My feeling is that #exception is null, since no exceptions were raised on page.
Try something like:
<% if !#exception.nil? %>
<%=h #exception.clean_message %>
<% end %>
Rails 2.3.8.
Here's the to_param in my shop model:
def to_param
require 'unicode'
"#{id}-#{Unicode::normalize_KD("-"+name+"-").downcase.gsub(/[^a-z0-9\s_-]+/,'').gsub(/[\s_-]+/,'-')[0..-2]}".gsub(/-{2,}/,'-')
end
When I tried to change #{id}- to #{id}/ the following:
def to_param
require 'unicode'
"#{id}/#{Unicode::normalize_KD("-"+name+"-").downcase.gsub(/[^a-z0-9\s_-]+/,'').gsub(/[\s_-]+/,'-')[0..-2]}".gsub(/-{2,}/,'-')
end
I get the following error in my index.html.erb:
shop_url failed to generate from {:type=>"places", :action=>"show", :controller=>"shops", :id=>#<shop id: 16, shop_type: "fashion", name: "Shop1", shop_subtype: nil, ...}
Extracted source (around line #54):
51:
52: <% #shops.each do |shop| %>
53: <div id="<%= dom_id(shop) %>" class="item">
54: <a href="<%= shop_path(shop, :type => #type) %>">
55: <% if !shop.photos.blank? %>
56: <%= image_tag(shop.photos.last.url(:thumb), :class => 'thumbnail') %>
57: <% else %>
I am trying to change the URL from shops/12-shop-abc to shops/12/shop-abc. In fact, I am actually trying to change to shops/shop-abc using friendly_id, but it fails on both.
Please help. Thanks.
The . in the name yields the error for normal to_param. It's solved with friendly_id.
This is my code in my model:
def to_param
require 'unicode'
"#{id}-#{Unicode::normalize_KD("-"+name+"-").downcase.gsub(/[^[:alnum:]]/,'-')}".gsub(/-{2,}/,'-')
end
I needed the unicode feature because in the name of my certain entries, it consists of accent (foreign characters). Without the unicode it was set to replace the accent character with a -.
But the problem right now is it gives me the following error:
ActionView::TemplateError (no such file to load -- unicode) on line #50 of app/views/spots/index.html.erb:
47:
48: <% #shops.each do |spot| %>
49: <div id="<%= dom_id(shop) %>" class="item">
50: <a href="<%= shop_path(shop, :type => #type) %>">
51: <% if !shop.photos.blank? %>
52: <%= image_tag(shop.photos.last.url(:thumb), :class => 'thumbnail') %>
53: <% else %>
What should I do? Thanks.
Try adding the unicode gem to your Gemfile:
gem 'unicode'