--
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
{"message":"invalid client_id"}What have I done wrong?
ThanksLouiseHi Eduardo,Have a look at http://canvabadges.herokuapp.com/ - which lets you do exactly that.
You received this message because you are subscribed to a topic in the Google Groups "Canvas LMS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/canvas-lms-users/8qwv6LbR4Uo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to canvas-lms-use...@googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I've installed my own instance of CanvaBadges on Heroku (http://blinkmobile-canvabadges.herokuapp.com/) and I receive the following error whenever I open the page:"Domain not properly configured. No Organization record matching the host blinkmobile-canvabadges.herokuapp.com"I'm new to Ruby so I imagine it's something on my end that I've forgotten to set (like an environment variable). If you/anyone could point me in the right direction, that would be great.Thanks!
On Thursday, 4 July 2013 08:52:17 UTC+10, whitmer wrote:
On Thursday, 4 July 2013 08:52:17 UTC+10, whitmer wrote:
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb in connect timeout(@open_timeout) { s.connect }/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb in block in connect timeout(@open_timeout) { s.connect }/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/timeout.rb in timeout return yield(sec) if sec == nil or sec.zero?/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/timeout.rb in timeout Timeout::timeout(n, e, &block)/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb in connect timeout(@open_timeout) { s.connect }/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb in do_start connect/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb in start do_start/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb in request start {/var/www/vhosts/ns388733.ovh.net/badge.unow.fr/lib/auth.rb in block in registered response = http.request(request)Hi!Actually you did help me! :)As it's true that we have to defined SESSION_KEY/DATABASE_URL at the server level on Heroku, I've made some searches and found a way to define those thanks to passenger. I'll explain how for others!The idea is to set up a file exporting those variables and to make passenger load this file on startup. Actually it is quite simple! Here is a step by step:- Create a file named "set_environment" (or whatever) in the root folder of your project and define there your variables like so (for canvabadges):export DATABASE_URL="postgres://username:password@hostname/database_name"export SESSION_KEY="your_secret_chain"And save the file!- Next create one other file, that would be conventionally named "ruby_wrapper". This little wrapper will only load the "set_environment" file + execute ruby: (I recommend using the "which ruby" command from the canvabadges project root to know the path to your ruby binary).#!/bin/shsource /path/to/project/set_environmentexec "/path/to/your/ruby"Once it's done, don't forget to remove those two files from your versioning manager (like git) as they contain some sensitive information. Then you have to add the "execute" right to the ruby_wrapper file. (sudo chmod u+x ruby_wrapper).- The last step is to tell passenger to use this ruby wrapper when it launches the server for this application. I've set it that in my VirtualHost, like so:SetEnv RACK_ENV productionPassengerRuby /path/to/your/project/ruby_wrapperThen on next restart passenger should load this file and everything should be set up and work as expected!Don't forget to create the postgres database that you put in your DATABASE_URL. Here is a starting guide on DataMapper to help you configure the application according to your needs: http://datamapper.org/getting-started.html. You should know that canvabadges is already configured to work perfectly with postgresql (as Heroku uses postgres so does the application ^^).One last thing, once you've created your database (in command lines, for instance), you have to initialize it. To do so, you have to launch the irb console from the root folder of the project. To make my life easier, I've created a third file, which I named "ruby_console" and I've put those lines in it:#!/bin/shexport RACK_ENV=productionsource path/to/your/project/set_environmentexec "/path/to/your/irb"Then I added the execution right on it, and I now just have to launch it ./ruby_console to have an irb console with the expected environment variables. (Again do not include it in git). Then the:> require './canvabadges.rb'Command should go through without any problems. Then you just have to launch:> DataMapper.auto_migrate!To initialize your database. (All the tables will be created with correct columns). Be warned, auto_migrate will wipe out existing data. Use "auto_upgrade!" if you already have some datas in your badge database...And that's it!I hope this little how to will help others!Would you mind if I add it to the documentation of canvabadges? Or in the wiki?
--
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.