Giter Site home page Giter Site logo

canvas-development-tools's Introduction

canvas-development-tools

Some handy scripts that I use to make life better while working on Canvas by Instructure.

Script breakdown:

  1. CODES.sh: The Canvas Open Development Environment Script (CODES) will take any OS X, Arch Linux, Ubuntu, Fedora, or Linux Mint system from a base install to a fully setup environment for developing Canvas. This script will do everything that the other scripts do individually, generally in a more robust fashion since the current PATH, working directory, and state of the system are more predictable. This script is full of helpful prompts and output to help you figure out what's going on when things go wrong. It can also be run as many times as needed to complete a setup or to clone a new repo.
  2. git-gerrit-submit: This handy script should be copied to somewhere in your PATH. After that, you can use the command git gerrit-submit to easily push the current changes to gerrit
  3. setup-new-repo.sh: This script sets up a freshly cloned canvas repo by building assets, setting the gerrit hook, creating ctags, etc. This script requires the others since it simply calls them to do its job
  4. backup-config-files.sh: This script will back up your current config files config/*.yml to a private git repo so you don't have to recreate them in the event that you lose them (such as a hard drive crash, a stolen computer, or a git clean -xfd). Each time you run this script a new commit is made to the repo with your latest changes. It will also push for you if you've set a remote (not required though, you can leave it as a local only repo if you want)
  5. backup-databases.sh: This script does a sql dump of your development databases and stores them in a directory named after the date. Very handy.
  6. add-custom-gems.sh: This script adds a few custom gems that I like to use, such as colorize, which makes outputting color to the Rails log easier
  7. add-gerrit-hook.sh: If you work for Instructure, Gerrit is mandatory. This script adds a post-commit hook that automatically adds a gerrit change-id and does some other helpful checks
  8. build-assets.sh: This script builds the canvas assets using rake
  9. create-database-config.sh: This script creates a basic database configuration for you 8. generate-ctags.sh: This script generates a fresh set of ctags for use with your favorite text editor
  10. initialize-databases.sh: This script runs the db initialization commands
  11. set-ruby-version.sh: This script writes the current ruby version to a .ruby_version file for use with chruby auto

canvas-development-tools's People

Contributors

freedomben avatar hola-there avatar ryankshaw avatar wizzah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

canvas-development-tools's Issues

Fresh Install Using ./CODES.sh -f

Fresh Install get this error :

Error: Cannot find module 'i18nliner/dist/lib/extractors/translate_call'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/var/www/canvas/node_modules/i18nliner-handlebars/dist/lib/t_call.js:5:37)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
module.js:471
throw err;
^

Any idea howto solve this ?

CODES.sh: ruby-install install fails on OSX 10.12.6 (maybe due to OpenSSL config)

When running CODES.sh --full I'm getting the following error:

>>> Downloading https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2 into /Users/hanley/src ...
--2017-09-20 16:33:15--  https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
Resolving cache.ruby-lang.org... 151.101.208.233
Connecting to cache.ruby-lang.org|151.101.208.233|:443... connected.
OpenSSL: error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version
Unable to establish SSL connection.
!!! Download of https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2 failed!
chruby: unknown Ruby: ruby-2.4.0
Chruby is installed
chruby: unknown Ruby: 2.4.0
Error installing ruby with ruby-install.  
Please try manually and run this script again (ruby-install ruby 2.4.0)

I'm not sure if it was due to the openssl build config I used or if the site was having trouble, but running ruby-install ruby 2.4.0 manually had the same result.

Workaround: I was able to get the CODES script to continue by:

  1. downloading the file using a browser (wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2 also failed)
  2. moving it to ~/src
  3. re-executing CODES.sh --full

I don't know if this is an issue that can be fixed, but I figured I would mention it.

Ubuntu 14.04.03 install fails at bundler gems installation

With clean installation of Ubuntu 14.04 (all current updates applied), the installer fails on bundler gems:

Installing the bundle gem version 1.10.5
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.9.1 directory.
Installing bundler without sudo failed. Trying again with sudo...
Successfully installed bundler-1.10.5
1 gem installed
Installing ri documentation for bundler-1.10.5...
Installing RDoc documentation for bundler-1.10.5...
Bundler is installed
Installing bundler gems with bundle install (but no mysql)
Making sure the gem location is in PATH
Your Ruby version is 1.9.3, but your Gemfile specified 2.1.6
Error installing required gems. Please run 'bundle install' manually and try again

I'm going to figure out how to install ruby manually, and then rerun the script. Hopefully it should continue where it left off.

Ubuntu 14.10 install fails

ssilverm reported:

I had this same issue. Using Vagrant with an Ubuntu 14 box. Ended up having to up the memory to 1.5GB, and change Gemfiles.d/test.rb.

test.rb I removed version info for:
gem 'rspec'
gem 'rspec-rails'
gem 'rspec-legacy_formatters'
gem 'rspec-collection_matchers'

Theme Editor and E-mails

So I got Canvas to install successfully but there are two options that are not working, theme editor and e-mail notifications. I configured the e-mail notifications using gmail smtp server information but I still don't get any e-mails with a password. I also have problems with the whole theme editor option. I cannot change theme, apply nor preview any changes. I read that it was a permission issue back in the Google Canvas group but I do not seem to have "canvasuser" set in order to change the permissions.

/canvas$ sudo chmod 777 -R client_apps/canvas_quizzes/
/canvas$ sudo chown -R canvasuser client_apps/canvas_quizzes/

/canvas$ sudo chmod 777 -R public/javascripts/
/canvas$ sudo chmod -R canvasuser public/javascripts/
/canvas$ sudo chmod -R 777 public/
/canvas$ sudo chown -R canvasuser public/
/canvas$ sudo chmod -R 777 .yardoc/
/canvas$ sudo chown -R canvasuser .yardoc/

Error installing required npm assets, during QuickStart Installation

Hello,
I am getting some errors while using the automated installation script from the QuickStart guide.
It seems to chug along quite nicely and install all 204 Gemfile dependencies.

But when it starts "Installing required npm assets", thats when the warnings and the errors start flying.
I've attached a screen-grab of my console window.

Between the warning and the Errors, I also noticed these two lines which I don't understand, but they don't sound good. :-)

ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)

screen shot 2015-06-24 at 8 52 18 am

NodeJS not Installed

Hi,

I have been trying to install Canvas through your development tools but for some reason it is not recognizing that I have NodeJS already installed. I have also completely uninstalled it seeing to let it install for me but it just comes to a full stop asking me to manually install it.

edit: nevermind, Canvas only supports older versions of node. I just switched node to 0.12 using nvm

Email Invalid

I recieved this error in the startup script:

Oh no!  You're using an OS I don't know how to support yet.  Please report this to [email protected]

And I sent and email to [email protected] and it sent a bounceback email

EDIT: The OS I was trying to install on was CentOS 7

Updated Terms of Use Dialog Box producing an error

I installed Canvas on my local Mac running OSX 10.10.3 with a 2.3 GZ processor and 4GB of ram,
and when I run the server on LocalHost3000, first I get the cool gray login-dialog box where I type in my login info, and then I get a new screen with a dialog box that says "Updated Terms of Use"... I click "Agree", and then I click "Submit".... but then instead of getting routed to the dashboard (or root route).... I just get a chunk of code displayed in the browser (which looks like my login hash data).... which should be getting processed by some method in the app instead of getting sent to the browser.

Help!

See attached screenshots
screen shot 2015-06-30 at 10 18 25 am

screen shot 2015-06-30 at 10 18 37 am

Canvas install script fails on first pass (bundle update)

canvas-script-install

First running of the script fails on asset compilation (image included). Choosing not to continue, running bundle install, and restarting the script allows it to complete successfully.

Note I just run 'bundle install' in the canvas-lms directory, whereas the guide states '$GEM_HOME/bin/bundle install --without mysql'. And 'bundle exec rails server' to start instead of '$GEM_HOME/bin/bundle exec rails server'. So I probably have it in the wrong directory.

It's an excellent script though - since I seem to have canvas running with no real knowledge of linux, nodejs or Ruby.

CODES.sh assumes Bash

In various locations in the script, it assumes that Bash is the shell.

This can be done easily by adding these lines of code to '/Users/brandon/.bash_profile':

Why Always Detect Ruby 1.9.3 ?

Trying install but the process failed with error :
_

Your Ruby version is 1.9.3, but your Gemfile specified 2.3.1
Error installing required gems. Please run 'bundle install' manually and try again

_
i'm trying install ruby 2.3.1 manual, but it's still detect ruby 1.9.3
what should i do ?

Theme Editor Doesn't Work

Using fresh install ubuntu 14.04 and follow quickstart guide, everythings good, but, when testing theme editor, nothing happen, stuck in generating preview, have you test theme editor with quickstart guide manual ?

How to solve this issue ?

undefined local variable or method in CODES.sh

An error is displayed when running CODES.sh.

This can be done by adding these lines to '/Users/brandon/.bash_profile':

# Added by canvas-lms setup-development script
# This adds the gem bin to your PATH
if ! $(echo $PATH | grep "$(gem env 'GEM_PATHS' | sed -e 's|:|/bin:|g')/bin" >/dev/null 2>&1); then
    export PATH="$PATH:$(gem env 'GEM_PATHS' | sed -e 's|:|/bin:|g')/bin"
fi

Do this now? ([Y]/N): n
-e:1:in `<main>': undefined local variable or method `req_bundler_version_ceiling' for main:Object (NameError)
Bundler is installed
Bundler is installed
Installing bundler gems with bundle install (but no mysql)
Making sure the gem location is in PATH

node

Yo bp,

You may want to add a check for version of node. I was running into this issue while trying to install canvas:

instructure/canvas-lms#712

Happy trails! (snow dog trails)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.