I've done a CKAN development install and am running with debug = true in my development.ini file. On visiting localhost:5000 I get an error with a traceback whose end point is the error:
AttributeError: 'module' object has no attribute 'css/main.debug.css'
Caused by the call in lib/helpers.py:
r = getattr(fanstatic_resources, resource)
Any idea what I'm doing wrong and what I can do to fix this error.
I'm using an ubuntu 12.04 and experiencing some problems with this
Was getting this error after following Sean's answers and running
npm install less nodewatch
and got this error:
Found another thread that explains this and offers the solution to execute
However after running the above command I am getting this error:
Seems like the version are incompatible or could this be the problem with node and node.js?
Cheers, Shao
I got few errors while installing the packages. Following is the solution (according to official CKAN docs) for impatient:
cp /usr/lib/ckan/default/src/ckan/ckan/public/base/css/main.css /usr/lib/ckan/default/src/ckan/ckan/public/base/css/main.debug.css
Beware that
apt-get install nodejs
installsnodejs
and NOTnode
in/usr/bin
, at least in Ubuntu 12.10 (I didn't check in other distributions). This throws errors since bothckan/bin/less
as well asckan/node_modules/less/bin/lessc
are callingnode
. So either create a softlink in /usr/bin or modify the scripts (#!/usr/bin/env nodejs
).You need to run the
less
script from thebin
directory in the CKAN source code to build themain.debug.css
file. There is some documentation of this but it's not yet integrated with the rest of the CKAN docs (i.e. there's no link to it anywhere, we have a ticket to fix this).This works on Ubuntu 12.04, you might need to have your virtualenv active when you do this:
Now restart the
paster serve development.ini
command and it should work.Generally speaking whenever running CKAN 2.0 for development you should:
debug = True
in your ini file./bin/less
running in a terminal all the time