[ckan-dev] Plugin not found when deployed to a production server
Nigel Babu
nigel.babu at okfn.org
Tue Jun 10 05:10:02 UTC 2014
Hi Qifeng,
Your plugin must not be installed inside the ckan folder, it should be on the
same level as ckan instead.
/usr/lib/ckan/default/src/ckan <-- ckan source code. Don't touch this.
/usr/lib/ckan/default/src/ckanext-foo <-- this where your plugin should reside
Once you clone it there, you need to activate your virtualenv and install it:
source /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckanext-foo
python setup.py develop
On Fri, Jun 06, 2014 at 02:04:47AM +0000, Qifeng.Bai at csiro.au wrote:
> Hi, there
> I have created a plugin and tested on my development server, All is OK
>
> The plugin sits in:
> /home/ckan/lib/default/src/nlmpext:
> ->ckanext
> ->__init__.py
> -> nlmp #this directory contain all my files
> ->setup.py
>
> In setup.py, I defined two extensions
> experiment_nlmp=ckanext.nlmp.plugin:NlmpExperimentPlugin
> project_nlmp=ckanext.nlmp.plugin:NlmpProjectFormPlugin
>
> I followed the guides, run python setup.py develop
>
> And then add these two plugins into /home/ckan/set/default/development.ini
> ckan.plugins = stats text_preview recline_preview project_nlmp experiment_nlmp
>
> ALL GOOD
>
> I have already created CKAN on window azure from VM_DEPOT, the production server also works well
>
> I have uploaded my extension to /usr/lib/ckan/default/src/ckan/ckanext
>
> So the directory is /usr/lib/ckan/default/src/ckan/ckanext/nlmp
> ->setup.py
> ->ckanext
> ->setup.py
> ->ckanext
> ->__init__.py
> -> nlmp #this directory contain all my files
> Then I ran: python setup.py develop
> See the log, seems all good: ckanext-nlmp 0.3 is already the active version in easy-install.pth
>
> Also I added these two extions into production.ini. However, it gave me an error:
> PluginNotFoundException: project_nlmp
>
> I am aware of there is a __init__.py under /usr/lib/ckan/default/src/ckan/ckanext/
> Although I don't have this file under nlmp folder, I wonder it still mess up my namespace
>
> Any advice is appreciated
>
> Qifeng
>
>
>
>
>
>
> [cid:image001.gif at 01CC55BF.85E7FEB0]
>
> Qifeng Bai
> Software Engineer
> CSIRO Land and Water
> Black Mountain, Canberra
>
> Ph: +61-2-62465704
> Web: www.clw.csiro.au
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
--
Nigel Babu
Developer, Open Knowledge
More information about the ckan-dev
mailing list