Removing project from dbconsole.

15 views
Skip to first unread message

kolargol

unread,
Sep 27, 2010, 7:24:46 AM9/27/10
to Gitorious
Hello,

I have runned into trouble after deleting repo - website returning
error and dump is generated:

A ActionView::TemplateError occurred in projects#show:

Couldn't find Repository with ID=141
On line #25 of app/views/events/_event.html.erb

22: %>
23: <% relative_time ||= false -%>
24:
25: <% action, body, category = action_and_body_for_event(event) %>
26: <li class="event_instance <%= relative_time ? 'relative' : ''
%> <%= Action::css_class(event.action) -%>" id="<%= dom_id(event) -
%>">
27: <% unless relative_time -%>
28: <p class="event_date"><%=
event.created_at.to_s(:short_time) -%></p>


now i want to delete that project but i need to do it from rails db
console. How to do it safely?

Second question (minor): what is the query done for geting this
repo_id 141 ?? I look via all the tables and can't find that
relation ...

Thanks !

kolargol

unread,
Sep 28, 2010, 4:27:36 AM9/28/10
to Gitorious
so, noone knows how to remove project manually ?

Marius Mårnes Mathiesen

unread,
Sep 28, 2010, 5:50:15 AM9/28/10
to gito...@googlegroups.com
On Tue, Sep 28, 2010 at 10:27 AM, kolargol <zbyszek.z...@gmail.com> wrote:
so, noone knows how to remove project manually ?

Well, you should be able to find the project like this:

p = Project.find_by_slug "<name of project>" 
p.destroy

This will remove the project and all associated objects from the database.

Cheers,
- Marius

kolargol

unread,
Sep 28, 2010, 6:29:16 AM9/28/10
to Gitorious
Thank you very much !


On Sep 28, 11:50 am, Marius Mårnes Mathiesen
<marius.mathie...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages