Open mike32jacobs opened 1 year ago
It looks like there's a syntax error in script/common/utils/common.sh
, although it's not clear if that is relevant to the dory failure.
Unfortunately that's a tough one. How did you install ruby? Did you use the system package manager (like apt
or dnf
) or did you use something like chruby
?
I used apt.
Here is the function where the syntax error appears to be taking place.
function check_dependencies {
message "Checking Dependencies..."
missing_packages=()
wrong_version=()
IFS=',' read -r -a DEPS <<< "$dependencies"
for dependency in "${DEPS[@]}"; do
IFS=' ' read -r -a dep <<< "$dependency"
if ! installed "${dep[0]}"; then
missing_packages+=("$dependency")
continue
fi
if [[ ${#dep[@]} -gt 1 ]]; then
version=$(eval "${dep[0]}" version |grep -oE "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")
if (( $(echo "$version ${dep[1]}" | awk '{print ($1 < $2)}') )); then
wrong_version+=("$dependency or higher. Found: ${dep[0]} $version.")
fi
fi
done
if [[ ${#missing_packages[@]} -gt 0 ]] || [[ ${#wrong_version[@]} -gt 0 ]]; then
message "Some additional dependencies need to be installed before continuing."
print_missing_dependencies
fi
}
As far as the other error message goes:
/usr/local/bin/dory:25:in `load': cannot load such file -- /var/lib/gems/3.0.0/gems/dory-1.2.0/bin/dory (LoadError)
from /usr/local/bin/dory:25:in `<main>'
/usr/local/bin/dory:25:in `load': cannot load such file -- /var/lib/gems/3.0.0/gems/dory-1.2.0/bin/dory (LoadError)
from /usr/local/bin/dory:25:in `<main>'
I open this file and see:
#!/usr/bin/ruby3.0
#
# This file was generated by RubyGems.
#
# The application 'dory' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
Gem.use_gemdeps
version = ">= 0.a"
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('dory', 'dory', version)
else
gem "dory", version
load Gem.bin_path("dory", "dory", version)
end
The error appears to be here:
if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('dory', 'dory', version)
else
Potentially, the problem is the following path
/var/lib/gems/3.0.0/gems/dory-1.2.0/bin/dory
There is no directory entitled "dory-1.2.0". There is a file a somewhere close.
/var/lib/gems/3.0.0/dory-1.2.0.gem
I am wondering if you have any ideas, or if you think I should post this to other people on the forum. I appreciate your time.
This same problem happens for me. Just run "dory status" to get the described issue. That is what the Canvas script/common/utils/dory_setup.sh
file is trying to do. Note that it sources script/common/utils/common.sh
, and that is what gives the syntac error, but it is not related to the actual issue.
If I instead run "sudo dory status" I get
[*] Nginx proxy: Running as docker container dory_dinghy_http_proxy
[*] Dnsmasq: Running as docker container dory_dnsmasq
[*] Resolv is not configured
Everything needs to be run via sudo
it seems, but the Canvas scripts don't do that.
I'm seeing this same issue with the current version of Canvas LMS on Ubuntu 20.04. I'm using the system provided Ruby 2.7 installed with apt. I can also confirm I get the error if I run dory status
without sudo.
Did anyone find a solution to this?
> Starting dory...
Traceback (most recent call last):
1: from /usr/local/bin/dory:23:in `<main>'
/usr/local/bin/dory:23:in `load': cannot load such file -- /var/lib/gems/2.7.0/gems/dory-1.2.0/bin/dory (LoadError)
Traceback (most recent call last):
1: from /usr/local/bin/dory:23:in `<main>'
/usr/local/bin/dory:23:in `load': cannot load such file -- /var/lib/gems/2.7.0/gems/dory-1.2.0/bin/dory (LoadError)
I am having the same issue
If sudo dory status
seems ok, and sudo docker ps
shows the dory_dinghy_http_proxy
runs fine, you can just ignore the err massage by comment the exit 1
inside script/common/utils/dory_setup.sh
file:
function start_dory {
message 'Starting dory...'
if sudo dory status | grep -q 'not running'; then
confirm_command 'sudo dory up'
elif ! sudo dory status; then
message "Something went wrong with dory! Exiting script."
#exit 1 # comment this line to continue
else
message 'Looks like dory is already running. Moving on...'
fi
}
What worked for me:
sudo dory up
docker compose up -d
@FreedomBen I am wondering if you could help me figure out my issue. I am trying to install a development version of Canvas LMS using this Quick Start Guide. Input:
The first time I ran it, I had the following output:
So, I stalled dory and ran the script again. Input:
Output after installing dory:
I am wondering if you have any ideas. I keep running into a wall, so I thought you would be the person who could help.