Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no script/generate crm_cats_migration? #1

Open
JezC opened this issue Jul 20, 2011 · 1 comment
Open

no script/generate crm_cats_migration? #1

JezC opened this issue Jul 20, 2011 · 1 comment

Comments

@JezC
Copy link

JezC commented Jul 20, 2011

Hi - I'm not a real Rails pro, so I may be doing something daft... apologies if so. I've got fat_free_crm running. I've added plugins for the Google integration and the Google Calendar integration - that seems to be working, AFAICS.

However, when I add this, I get a lot of problems... I forked fat_free_crm on github, did a "script/plugin install" for each of the awesome_nested_set and crm_cats. Because the current README for crm_cats says I must be using the v0.2 tag, after the "script/plugin install" I do:

cd vendor/plugins
rm -rf crm_cats
git clone https:...crm_cats.git
cd crm_cats
git checkout v0.2
cd ../../..
script/generate crm_cats_migration

And at that point, it fails because there is no generator for crm_cats_migrate

However, there is a rake task that I can do, which seems suitable:

rake db:migrate:plugin NAME=crm_cats

This creates the tables that I guess the script/generate was supposed to do - so that's probably some old documentation?

When I restart the app, I get a new admin tab for Categories. Clicking on it gives me a 500, and the log file says:

Parameters: {"action"=>"index", "controller"=>"admin/cats"}

NameError (uninitialized constant Admin::CatsController::Cat):
vendor/plugins/crm_cats/app/controllers/admin/cats_controller.rb:154:in get_cats' vendor/plugins/crm_cats/app/controllers/admin/cats_controller.rb:10:inindex'
vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in process' config/initializers/mongrel.rb:62:indispatch_cgi'

I can't see a route in config/routes for admin/cats. I can't see a file in app/controllers/admin as cats_controller.rb (wouldn't that be the right name?). I have no idea whether I'm using out of date docs, or whether I've misunderstood a step... or what. All I know is that so far it looks as though it ought to work, if only I could understand what the next tweak is.

Help, please!

@jgordor
Copy link

jgordor commented Jul 21, 2011

Hi JezC,

The plugin may be outdated to work with current versions fo ffc, the controller is in the plugin directory:

https://github.com/tractis/crm_cats/blob/v0.2/app/controllers/admin/cats_controller.rb

And the route: https://github.com/tractis/crm_cats/blob/v0.2/config/routes.rb

Controller and route seems ok, see the error generated on the cats_controller, seems that the model Cat is not loaded https://github.com/tractis/crm_cats/blob/v0.2/app/models/cat.rb from the plugin models.

What rails version are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants