Closed medhamsh closed 10 years ago
After you install the edx-platform, you can start it up using the commands:
$ workon edx-platform # starts py env $ cd ~/edx_all/edx-platform/ # switch to working directory $ rake install_prereqs # install all required prerequisites $ rake django-admin[syncdb] # database synchronbisation (create all necessary tables) $ rake django-admin[migrate] # database update (update all tables) $ rake cms # start Studio (content management system)
@medhamsh - have you tried running these commands in this order?
The commands:
$ rake install_prereqs $ rake django-admin[syncdb] $ rake django-admin[migrate]
should be done only once, after the initial install. However, if you want to reset edx-platform to the pristine state (just as it was after the installation), you can do:
$ workon edx-platform $ cd ~/edx_all/edx-platform/ $ git clean -fxd $ rm ../db/mitx.db $ mongo xmodule --eval "db.dropDatabase()" $ mongo xcontent --eval "db.dropDatabase()"
and then perform the rest of the commands:
$ rake install_prereqs $ rake django-admin[syncdb] $ rake django-admin[migrate] $ rake cms
Hope this helps!
Thanks for a quick reply.
But the first command, rake install_prereqs itself is creating errors.
mkdir -p /opt/wwc/edx-platform/.prereqs_cache
npm install
npm WARN coffee-script@1.6.1 package.json: bugs['name'] should probably be bugs['url']
bundle install
rake aborted!
Command failed with status (127): [bundle install...]
/opt/wwc/edx-platform/rakelib/prereqs.rake:22:in block (2 levels) in <top (required)>' /opt/wwc/edx-platform/rakelib/helpers.rb:46:in
when_changed'
/opt/wwc/edx-platform/rakelib/prereqs.rake:21:in `block in <top (required)>'
Tasks: TOP => install_prereqs => install_ruby_prereqs
(See full trace by running task with --trace)
Also, where is all this documented? I could not find them.
@valera-rozuvan , Now the node and npm errors start appearing. What versions of node, coffeescript are exactly required?
This is what I have on my dev system:
$ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS" NAME="Ubuntu" VERSION="12.04.3 LTS, Precise Pangolin" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu precise (12.04.3 LTS)" VERSION_ID="12.04"
$ node --version v0.10.18
$ nodejs --version v0.10.18
$ coffee --version CoffeeScript version 1.4.0
$ python --version Python 2.7.3
$ ruby --version ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-linux]
Now, the rake install_prereqs went fine but rest of the commands fail.
If the install_prereqs went fine there should not be any requirements problem. But the following occurs,
./manage.py lms --settings dev migrate --traceback
2013-11-13 15:07:21,669 DEBUG 16853 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin NOSETESTS_PLUGINS = rednose:RedNose
2013-11-13 15:07:21,673 DEBUG 16853 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin nose_exclude = nose_exclude:NoseExclude
2013-11-13 15:07:21,675 DEBUG 16853 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin xcover = nosexcover:XCoverage
2013-11-13 15:07:21,677 DEBUG 16853 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin nose_ignoredoc = nose_ignoredoc:IgnoreDocstrings
2013-11-13 15:07:21,714 INFO 16853 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
Traceback (most recent call last):
File "./manage.py", line 95, in
My main thing is to be able to delete courses and I am not able to do so. Please throw some light on this.
Looking at the logs, i see the error ImportError django_extensions: No module named django_extensions
. Googling a bit, http://stackoverflow.com/questions/1662843/django-extensions-error-message .
Yesterday after some googling I found that I need to explicitly write django_extensions in the common.py/settings.py. Removed it now. Now the error is different. Operational error, unable to open the db file.
sqlite3.OperationalError: unable to open database file rake aborted! Command failed with status (1): [./manage.py lms --settings dev syncdb --tr...] /opt/wwc/edx-platform/rakelib/django.rake:65:in `block in <top (required)>' Tasks: TOP => django-admin
But apart from all this, I could delete the course using the rake task, rake django-admin[[delete_course,cms,aws,"Org/no/course commit"]
So I am good with this now but I feel that the app is not yet production ready.
@valera-rozuvan , thanks for your directions. After referring to the versions of software you shared, I made all the same versions in my setup and some things started working. Have to stabilize the setup though.
Also, the manual policy definitions dont seem to help much. I want to make the course visible only to logged in users. I tried setting the policy definition anonymous_view to false but no change in effect. I also want to hook LDAP authentication and disable registration of accounts.
sqlite3.OperationalError: unable to open database file
Look in the config file for sqlite3. Where is the DB file? See what access rights it has. Does it even exist? By the way, does your system have mongodb installed and running?
mongodb yes. it is there and it is running. There are these dbs running.
cs_comments_service 0.203125GB cs_comments_service_development 0.203125GB edxapp 0.203125GB local 0.078125GB xmodule (empty)
And, for the sqlite db I tried locating it a lot but couldn't find it. If there is no db at all how is the edX app working? This is my first time with django based app and I am not able to get the hang of architecture at all. It needs ruby, python, node, mysql, mongo and sqlite. Seeming very gibberish to me now.
The below commands set up a sqlite db for you.
$ workon edx-platform $ cd ~/edx_all/edx-platform/ $ rm ../db/mitx.db $ rake django-admin[syncdb] $ rake django-admin[migrate]
If all went well, you can then see that the DB is indeed populated by
$ sqlite3 ../db/mitx.db
and within the sqlite3 REPL you can run 2 commands (.databases, .tables). Below is what I get:
sqlite> .databases seq name file
0 main /home/valera/edx_all/edx-platform/../db/mitx.db
sqlite> .tables
auth_group
auth_group_permissions
auth_permission
auth_registration
auth_user
auth_user_groups
auth_user_user_permissions
auth_userprofile
bulk_email_courseauthorization
bulk_email_courseemail
bulk_email_courseemailtemplate
bulk_email_optout
celery_taskmeta
celery_tasksetmeta
certificates_certificatewhitelist
certificates_generatedcertificate
circuit_servercircuit
course_creators_coursecreator
course_groups_courseusergroup
course_groups_courseusergroup_users
course_modes_coursemode
courseware_offlinecomputedgrade
courseware_offlinecomputedgradelog
courseware_studentmodule
courseware_studentmodulehistory
courseware_xmodulestudentinfofield
courseware_xmodulestudentprefsfield
courseware_xmoduleuserstatesummaryfield
django_admin_log
django_comment_client_permission
django_comment_client_permission_roles
django_comment_client_role
django_comment_client_role_users
django_content_type
django_openid_auth_association
django_openid_auth_nonce
django_openid_auth_useropenid
django_session
django_site
djcelery_crontabschedule
djcelery_intervalschedule
djcelery_periodictask
djcelery_periodictasks
djcelery_taskstate
djcelery_workerstate
external_auth_externalauthmap
foldit_puzzlecomplete
foldit_score
instructor_task_instructortask
licenses_coursesoftware
licenses_userlicense
notes_note
notifications_articlesubscription
notify_notification
notify_notificationtype
notify_settings
notify_subscription
psychometrics_psychometricdata
shoppingcart_certificateitem
shoppingcart_order
shoppingcart_orderitem
shoppingcart_paidcourseregistration
south_migrationhistory
student_courseenrollment
student_courseenrollmentallowed
student_pendingemailchange
student_pendingnamechange
student_testcenterregistration
student_testcenteruser
student_userstanding
student_usertestgroup
student_usertestgroup_users
track_trackinglog
user_api_userpreference
verify_student_softwaresecurephotoverification
waffle_flag
waffle_flag_groups
waffle_flag_users
waffle_sample
waffle_switch
wiki_article
wiki_articleforobject
wiki_articleplugin
wiki_articlerevision
wiki_articlesubscription
wiki_attachment
wiki_attachmentrevision
wiki_image
wiki_imagerevision
wiki_reusableplugin
wiki_reusableplugin_articles
wiki_revisionplugin
wiki_revisionpluginrevision
wiki_simpleplugin
wiki_urlpath
That is the whole point where it stuck right. There is no folder called db or any file called mitx and when i run the rake django[syncdb] it stops complaining that unable to open database file. Else should I manually create a db called mitx.db and run the syncdb command?
When there is no db/mitx.db
file, the command rake django-admin[syncdb]
creates one for you. Can you please paste complete output from the console when you run this command.
aah, here it is.
./manage.py lms --settings dev syncdb --traceback
2013-11-14 05:39:23,904 DEBUG 30917 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin NOSETESTS_PLUGINS = rednose:RedNose
2013-11-14 05:39:23,907 DEBUG 30917 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin nose_exclude = nose_exclude:NoseExclude
2013-11-14 05:39:23,908 DEBUG 30917 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin xcover = nosexcover:XCoverage
2013-11-14 05:39:23,910 DEBUG 30917 [nose.plugins.manager] manager.py:385 - DefaultPluginManager load plugin nose_ignoredoc = nose_ignoredoc:IgnoreDocstrings
2013-11-14 05:39:23,944 INFO 30917 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
Syncing...
Traceback (most recent call last):
File "./manage.py", line 95, in
$ sqlite3 --version 3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e
I think something went wrong during your install.
@medhamsh is this still a problem with the latest version of the codebase?
Hi, I have installed edx-platform on stand alone Ubuntu 12.04. There were many hiccups and the installation was not so smooth. After fiddling much could get edX up and running but there is an issue with every rake task. Following is the error.
rake django-admin[sync_user_info,lms,dev]]
./manage.py lms --settings dev] sync_user_info --traceback Traceback (most recent call last): File "./manage.py", line 90, in
startup = importlib.import_module(edx_args.startup)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/opt/wwc/edx-platform/lms/startup.py", line 6, in
from django.conf import settings
ImportError: No module named django.conf
rake aborted!
Command failed with status (1): [./manage.py lms --settings dev] syncuser...]
/opt/wwc/edx-platform/rakelib/django.rake:65:in `block in <top (required)>'
Tasks: TOP => django-admin
(See full trace by running task with --trace)
I am sure this is python's compatibility issue. What needs to be changed for this? Thanks in advance