instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.43k stars 2.43k forks source link

Quick install fails on Bundle install #2137

Closed khrizt closed 1 year ago

khrizt commented 1 year ago

Summary:

When executing the script to install the development environment I get an write permissions' error.

Steps to reproduce:

  1. Clone repository
  2. Execute ./scripts/docker_dev_setup.sh

The error says There was an error while trying to write to /usr/src/app/Gemfile.rails61.lock.. I've seen other issue saying that previously creating the Gemfile.lock solves this issue, but the script removes the previously created Gemfile.lock file and creates a new one and gives it permissions.

Also I've looked at the Troubleshooting page and haven't found anything related to this.

Is there any fix to this?

Thanks

PS: I attach more of the log file, maybe it can help

Successfully built 83dc8f1fbe77
Successfully tagged canvas-lms_jobs:latest
Starting docker containers...
canvas-lms_redis_1 is up-to-date
canvas-lms_postgres_1 is up-to-date
canvas-lms_web_1 is up-to-date

ESC[1m> For historical reasons, the Canvas Gemfile.lock is not tracked by git. We may
need to remove it before we can install gems, to prevent conflicting dependency
errors.ESC(BESC[m
touch: cannot touch 'Gemfile.lock': Permission denied

ESC[1m> The 'docker' user is not allowed to write to Gemfile.lock. We need write
permissions so we can install gems.ESC(BESC[m

ESC[1m> Building assets...ESC(BESC[m
> Bundle install...
Running bundle config and bundle install...
Your application has set build.nokogiri to "--use-system-libraries". This will override the global value you are currently setting
Your application has set build.ffi to "--enable-system-libffi". This will override the global value you are currently setting
Fetching https://github.com/rails-api/active_model_serializers.git
Fetching https://github.com/instructure/i18nliner.git
Fetching https://github.com/robotdana/json_schemer.git
Fetching https://github.com/instructure/week-of-month.git
Fetching https://github.com/kreynolds/cassandra-cql.git
Fetching https://github.com/twitter/thrift_client.git
Fetching https://github.com/rda1902/spring-commands-rubocop.git
Fetching https://github.com/erickguan/ffi-icu.git
Fetching https://github.com/kyler-instructure/rspecq.git
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies............................................

[...]
Using rubocop 1.22.3
Using respondus_soap_endpoint 1.1.0 from source at `/usr/src/app/gems/plugins/respondus_soap_endpoint`
Using rubocop-canvas 1.0.0 from source at `gems/rubocop-canvas`
Using rubocop-performance 1.12.0
Using rubocop-rails 2.12.4
Using rubocop-rake 0.6.0
Using rubocop-rspec 2.6.0
Using sentry-inst_jobs 1.0.2
Using simply_versioned 1.0.0 from source at `/usr/src/app/gems/plugins/simply_versioned`
Using switchman-inst-jobs 4.0.13
Using workflow 0.0.1 from source at `gems`
Using academic_benchmark 1.1.0 from source at `/usr/src/app/gems/plugins/academic_benchmark`
Using account_reports 1.1.0 from source at `/usr/src/app/gems/plugins/account_reports`
Using acts_as_list 0.0.1 from source at `gems`
Using adheres_to_policy 0.0.1 from source at `gems`
Using aroi 0.0.7
Using attachment_fu 1.0.0 from source at `gems`
Using config_file 0.1.0 from source at `gems`
Using bookmarked_collection 1.0.0 from source at `gems`
Using canvas_errors 0.1.0 from source at `gems`
Using canvas_stringex 0.0.1 from source at `gems`
Using google_drive 1.0.0 from source at `gems`
Using inst-jobs-autoscaling 2.1.1
Using moodle_importer 1.0.0 from source at `/usr/src/app/gems/plugins/moodle_importer`
Using prawn-rails 1.3.0
Using qti_exporter 1.0.0 from source at `/usr/src/app/gems/plugins/qti_exporter`
Using canvas_cassandra 0.1.0 from source at `gems/canvas_cassandra`
Using dynamic_settings 0.1.0 from source at `gems`
Using inst_statsd 2.2.0
Using event_stream 0.1.0 from source at `gems`
Using canvas_cache 0.1.0 from source at `gems`
Using incoming_mail_processor 0.0.1 from source at `gems`
Using inst-jobs-statsd 2.2.0
Using live_events 1.0.0 from source at `gems`
Using audits 0.1.0 from source at `engines`
Using canvas_security 0.1.0 from source at `gems`
Using request_context 0.1.0 from source at `gems`
There was an error while trying to write to `/usr/src/app/Gemfile.rails61.lock`.
It is likely that you need to grant write permissions for that path.
  /o\ Something went wrong. Check /home/user/Projects/canvas-lms/log/docker_dev_setup.log for details.
nosadcoder commented 1 year ago

1, Check /home/user/Projects/canvas-lms/log/docker_dev_setup.log for details. 2, Guess file /usr/src/app/Gemfile.rails61.lock has not permission to write.

khrizt commented 1 year ago

Well, yes, you are right. I think this is the reason. The thing is that this file is not created by me, and I don't know how it's created and I don't know how to give it write permissions because probably the files is generated by the script or the file is already in the Docker image. Any help would be appreciated.

And the "Check /home/user/Projects/canvas-lms/log/docker_dev_setup.log" appears also inside the log file, what I've attached is the content of the log file.

odedara commented 1 year ago

@khrizt have a look for permissions https://github.com/instructure/canvas-lms/tree/master/doc/docker

khrizt commented 1 year ago

@odedara Thanks a lot, that worked for me. Maybe it should be added to the Quick start guide.