ActionController::RoutingError in Admin/users#index

74 views
Skip to first unread message

Kenny

unread,
Nov 29, 2011, 5:57:06 PM11/29/11
to Fat Free CRM Users
I just installed the crm_sample_tabs plugin, and when I login and then
click on the "Admin" link, it throws up this
ActionController::RoutingError in Admin/users#index.

Here is the full error page text:

***START***

ActionController::RoutingError in Admin/users#index

Showing C:/Sites/ffcrm/app/views/layouts/_tabbed.html.haml where line
#5 raised:

No route matches {:controller=>"admin/bananas"}

Extracted source (around line #5):

2: %ul

3: - tabs.each do |tab|

4: %li

5: = link_to(tab[:url], :class => tab[:active] ? "active" :
"") do

6: - unless request.fullpath.include?("/admin")

7: - img_base_path = "tab_icons/
#{tab[:text].to_s.downcase.sub(/^tab_/, '')}"

8: - if File.exists?(Rails.root.join("public/images/
#{img_base_path}.png"))

Trace of template inclusion: app/views/layouts/admin/
application.html.haml

Rails.root: C:/Sites/ffcrm

Application Trace | Framework Trace | Full Trace (I will break up
single lines with returns)

app/views/layouts/_tabbed.html.haml:5:in `block in
_app_views_layouts__tabbed_html_haml___599935247_52594476_37825934'

app/views/layouts/_tabbed.html.haml:3:in `each'

app/views/layouts/_tabbed.html.haml:3:in
`_app_views_layouts__tabbed_html_haml___599935247_52594476_37825934'

app/views/layouts/admin/application.html.haml:20:in
`_app_views_layouts_admin_application_html_haml___95155032_55233732_1036653241'

app/controllers/admin/users_controller.rb:27:in `index'

Request

Parameters:

None

Show session dump

Show env dump

Response

Headers:

None

***END***

I can also provide the session and env dump's if necessary.

Thanks!

-Kenny

Nathan Broadbent

unread,
Nov 29, 2011, 6:18:52 PM11/29/11
to fat-free-...@googlegroups.com
Hi Kenny,

Sorry about that, the original crm_sample_tabs plugin is currently
broken. We do need to fix all of our available plugins, or at least
add warning messages to their README files.

In the meantime, we have recently fixed a fork of this plugin for
another user. Please try out the fixed plugin here:
https://github.com/cpelon/crm_sample_tabs


Thanks,
Nathan

> --
> You received this message because you are subscribed to the Google Groups "Fat Free CRM Users" group.
> To post to this group, send email to fat-free-...@googlegroups.com.
> To unsubscribe from this group, send email to fat-free-crm-us...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fat-free-crm-users?hl=en.
>

Kenny

unread,
Nov 30, 2011, 4:47:53 PM11/30/11
to Fat Free CRM Users
Thanks for the quick response Nathan. I did just as you said, by
installing the fixed plugin. However, I am still running into some
issues. When I log in to the CRM I am now presented with the
"Products" tab on the far right of the tabs. When I go to click this
tab it gives me a StatementInvalid error:

***START***

ActiveRecord::StatementInvalid in Products#index

Showing c:/Sites/ffcrm/vendor/plugins/crm_sample_tabs/app/views/
products/index.html.haml where line #13 raised:

PGError: ERROR: relation "products" does not exist
LINE 4: WHERE a.attrelid = '"products"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"products"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

Extracted source (around line #13):

10: .remote#create_product{ hidden }
11:
12: .list#products
13: - if @products.any?
14: = render @products
15: - else
16: = render "shared/empty"

Rails.root: c:/Sites/ffcrm

Application Trace | Framework Trace | Full Trace

Request

Parameters:

None

Show session dump

Show env dump

Response

Headers:

None

***END***

I can provide the framework/full trace or the session/env dump's.

This could be an instance of me not quite understanding how the plugin
works. To me that error is saying that there is no products page
available to display. I don't see where I can go to create a new tab
or product page. I am also curious as to what the Settings and
Plugins tabs are in the admin section of the CRM. And last but not
least, I cannot create new leads. When I click either of the create
lead links, nothing ever happens.

If this is too many questions for one posting, please let me know.

Thanks again!

Kenny

> > `_app_views_layouts_admin_application_html_haml___95155032_55233732_1036653­241'

Kenny

unread,
Nov 30, 2011, 5:51:44 PM11/30/11
to Fat Free CRM Users
I think my lead creation issue may be attributed to me trying to
create a custom lead field. I tried to create a custom lead field. I
see there are three required fields to create one: Field label, Field
Type, and Field Group. When I try to make a selection from what
appears to be a drop down menu on Field Group, there are no
selections. Did I not do something properly when installing FFCRM?

Thanks again,

Kenny

Nathan Broadbent

unread,
Nov 30, 2011, 7:49:04 PM11/30/11
to fat-free-...@googlegroups.com
Hi Kenny,

The error from your first email just means that you need to migrate your database and add the 'products' table.
Sorry, I should have mentioned that the fixed plugin has also been extended, and the author is working to add some extra models and tabs for products and quotes. You will need to run 'rake db:migrate:plugins' to add those tables.

Also, Field Group is not a required field for custom fields. The custom fields are still very new, and the interface needs more work to make it more sensible. Sorry for that confusion.


Nathan

Kenny

unread,
Dec 1, 2011, 4:13:25 PM12/1/11
to Fat Free CRM Users
Thanks again for the quick response. When I try to run 'rake
db:migrate:plugins' (without the single quotes) It keeps giving me the
error: "The syntax of the command is incorrect". However I run the
command 'rake -T' and it says that 'rake db:migrate:plugins' is one of
the commands. I also tried navigating to the crm_sample_tags
directory, as well as a couple other directories. Am I missing a gem
that needs to be installed, or is it another issue?

Thanks again.

Kenny

On Nov 30, 5:49 pm, Nathan Broadbent <nathan....@gmail.com> wrote:
> Hi Kenny,
>

Nathan Broadbent

unread,
Dec 1, 2011, 9:12:48 PM12/1/11
to fat-free-...@googlegroups.com
Hi Kenny,

That doesn't seem to be an error from Fat Free CRM, in fact, it sounds very much like a Windows error. Perhaps that is not a valid windows command. Maybe you could try running the command with quotes around  "db:migrate:plugins" ?

Here's a blog post that might shed some light on your situation: Rake gotcha on windows

Most of the Ruby on Rails community use Linux or OSX. That doesn't mean that we don't support Windows, it just means that we might not be able to answer any of your questions if you get stuck on a Windows-related issue. 
I hope the blog post helps though!


Best Regards,
Nathan B

Kenny

unread,
Dec 9, 2011, 3:56:26 PM12/9/11
to Fat Free CRM Users
Hello again Nathan,

I have scrapped using Windows, and have successfully setup and
configured an Linux (Ubuntu) server. I am having a different issue
with the crm_sample_tabs plugin. I got it installed properly, and
when I tried creating a new product, but now when I go to the
Product's tab and try to display it, it give me this error:

***START***

ActiveRecord::RecordNotFound in ProductsController#index

Couldn't find ProductCategory without an ID

Rails.root: /home/scapeadmin/Sites/ffcrm

***END***

I know that it is throwing this error because the product that I tried
to create doesn't have an ID. I don't recall creating an ID when I
was attempting to create this product. However I may not be
remembering correctly. I have tried uninstalling the plugin. However
after reinstalling it, it doesn't appear that the database had
anything modified on it, so when I go to reinstall the plugin again, I
am stuck with the same error. Any help you could lend would be of
great help.

Thanks!

Kenny

On Dec 1, 7:12 pm, Nathan Broadbent <nathan....@gmail.com> wrote:
> Hi Kenny,
>

> That doesn't seem to be an error from Fat Free CRM, in fact, it sounds very
> much like a Windows error. Perhaps that is not a valid windows command.
> Maybe you could try running the command with quotes
> around  "db:migrate:plugins" ?
>
> Here's a blog post that might shed some light on your situation: Rake

> gotcha on windows<http://instantbadger.blogspot.com/2008/04/rake-gotcha-on-windows.html>

Kenny

unread,
Dec 9, 2011, 3:59:57 PM12/9/11
to Fat Free CRM Users
I would also like to add that after switching to Linux, the rake
db:migrate:plugins was working fine. So I don't know if there is a
rake command that undoes what rake db:migrate:plugins does.

Thanks,

Kenny

> > > > > To post to this group, send email to...
>
> read more »

Nathan Broadbent

unread,
Dec 13, 2011, 1:42:00 PM12/13/11
to fat-free-...@googlegroups.com
Hi Kenny,

The ID will be created automatically by the database, so you don't need to worry about that.
The crm_sample_tabs plugin is a work-in-progress, and it should only be used to get an idea of how plugins work. 
Chris is working on adding products and quotes, but I don't think it's quite ready to be released yet. 
We will also rename his plugin before promoting it. I'm planning to spend some time updating and documenting all of FFCRM's plugins, so I will try to do that soon.

Also, you mentioned:

 I don't know if there is a rake command that undoes what rake db:migrate:plugins does.

There isn't a command that does that just yet, but this issue will be covered when we re-write some of our plugin architecture to use Rails Engines


Regards,
Nathan

Kenny

unread,
Dec 14, 2011, 5:24:59 PM12/14/11
to Fat Free CRM Users
Ok. Thanks for your replies.

Regards,

Kenny

On Dec 13, 11:42 am, Nathan Broadbent <nathan....@gmail.com> wrote:
> Hi Kenny,
>

> > > > 37825934'...
>
> read more »

Reply all
Reply to author
Forward
0 new messages