Canvas LMS/Upgrading
(→Database Migrations) |
|||
Line 57: | Line 57: | ||
Errno::EACCES: Permission denied @ rb_sysopen - /var/canvas/config/cache_store.yml</nowiki> | Errno::EACCES: Permission denied @ rb_sysopen - /var/canvas/config/cache_store.yml</nowiki> | ||
Just like before, you'll need to set the appropriate permissions: | Just like before, you'll need to set the appropriate permissions: | ||
+ | <nowiki>/var/canvas$ sudo chmod 660 ./config/cache_store.yml</nowiki> | ||
+ | The above makes the assumption that the user you are logged in as is either the file owner or part of the group owner.<br> | ||
+ | Once the permission is set, try to upgrade again. If successful then: | ||
+ | <nowiki>/var/canvas$ sudo chmod 400 ./config/cache_store.yml</nowiki> | ||
==Notification types== | ==Notification types== | ||
<nowiki>~/var/canvas$ RAILS_ENV=production bundle exec rake db:load_notifications</nowiki> | <nowiki>~/var/canvas$ RAILS_ENV=production bundle exec rake db:load_notifications</nowiki> |
Revision as of 22:39, 14 January 2016
Contents |
Instruction source
All instructions are from the Canvas LMS Github wiki
Requirements
These upgrade instructions make the following assumptions:
- you installed canvas lms via git
- redis is running at a version greater than 2.6
- you are logged in as the original user who installed canvas and ran the git and gem installs
- you've created a backup or snapshot before continuing
- there are no local changes you've made to the canvas code that are different than the stable version on github
Upgrade Source
Start by logging in as the original user that installed Canvas. This is very important as you'll encounter permission issues with git.
~/var/canvas$ git fetch && git reset --hard origin/stable ... HEAD is now at da056ac treesame commit of origin/stable/2016-01-09
Upgrade and Install Bundled Gems
~/var/canvas$ bundle install
If you get the same error as I did:
/var/canvas$ bundle install Fetching source index from https://rubygems.org/ Resolving dependencies..... You have requested: addressable = 2.3.8 The bundle currently has addressable locked at 2.3.5. Try running `bundle update addressable`
Then instead first run:
~/var/canvas$ bundle update addressable
and you should get:
Your bundle is updated! Gems in the groups sqlite and mysql were not installed.
Follow that up with:
~/var/canvas$ bundle install
and you should get:
Your bundle is complete! Gems in the groups sqlite and mysql were not installed. It was installed into ./vendor/bundle
Upgrade and Install Node Modules
~/var/canvas$ npm install
Complied Assets
~/var/canvas$ RAILS_ENV=production bundle exec rake canvas:compile_assets
If you get an error:
rake aborted! Undumpable Exception -- #<Errno::EACCES: Permission denied @ rb_sysopen - /var/canvas/config/domain.yml>
Then you'll need to temporarily change permissions to allow the update:
/var/canvas$ sudo chmod 660 ./config/domain.yml
The above makes the assumption that the user you are logged in as is either the file owner or part of the group owner.
Once the permission is set, try to upgrade again. If successful then:
/var/canvas$ sudo chmod 400 ./config/domain.yml
Database Migrations
~/var/canvas$ RAILS_ENV=production bundle exec rake db:migrate
If you get an error:
rake aborted! Errno::EACCES: Permission denied @ rb_sysopen - /var/canvas/config/cache_store.yml
Just like before, you'll need to set the appropriate permissions:
/var/canvas$ sudo chmod 660 ./config/cache_store.yml
The above makes the assumption that the user you are logged in as is either the file owner or part of the group owner.
Once the permission is set, try to upgrade again. If successful then:
/var/canvas$ sudo chmod 400 ./config/cache_store.yml
Notification types
~/var/canvas$ RAILS_ENV=production bundle exec rake db:load_notifications