Closed anestores closed 1 year ago
I think you can fix this error by installing autoconf:
"sudo apt-get install autoconf"
Thank you. Issue was resolved. But another error occurred when resuming bundling. Will make another issue.
Since issue title is the same, i'll just open it here.
After installing autoconf via "sudo apt-get install autoconf", i re-executed the bundler
"bundle 2.2.15 install --path vendor/bundle"
The following error occurred:
Fetching pulsar-client 2.6.1.pre.beta.2
Installing pulsar-client 2.6.1.pre.beta.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /var/canvas/vendor/bundle/ruby/2.6.0/gems/pulsar-client-2.6.1.pre.beta.2/ext/bindings
/usr/bin/ruby2.6 -I /usr/lib/ruby/2.6.0 -r ./siteconf20210525-23767-1gcw5yj.rb extconf.rb
creating Makefile
current directory: /var/canvas/vendor/bundle/ruby/2.6.0/gems/pulsar-client-2.6.1.pre.beta.2/ext/bindings
make "DESTDIR=" clean
current directory: /var/canvas/vendor/bundle/ruby/2.6.0/gems/pulsar-client-2.6.1.pre.beta.2/ext/bindings
make "DESTDIR="
compiling bindings.cpp
In file included from bindings.cpp:3:0:
message.hpp:8:27: fatal error: pulsar/Client.h: No such file or directory
compilation terminated.
Makefile:300: recipe for target 'bindings.o' failed
make: *** [bindings.o] Error 1
make failed, exit code 2
Gem files will remain installed in /var/canvas/vendor/bundle/ruby/2.6.0/gems/pulsar-client-2.6.1.pre.beta.2 for
inspection.
Results logged to
/var/canvas/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/pulsar-client-2.6.1.pre.beta.2/gem_make.out
An error occurred while installing pulsar-client (2.6.1.pre.beta.2), and Bundler cannot continue.
Make sure that gem install pulsar-client -v '2.6.1.pre.beta.2' --source 'https://rubygems.org/'
succeeds before
bundling.
In Gemfile:
pulsar-client
Kindly advise how to proceed. Thank you.
I got this too, one workaround for this is running bundle install with --without pulsar: "bundle 2.2.15 install --path vendor/bundle --without pulsar"
Hope someone has a better solution!
@trangmx:
Hope someone has a better solution! You could install the
pulsar-client
gem build dependencies instead of using--without pulsar
. I think only the devel library is required, but I installed both (pulsar-client
&pulsar-client-dev
) and that worked fine.
@anestores and @trangmx - Have either of you managed to successfully complete the build? The step I'm getting stuck on is:
RAILS_ENV=production bundle exec rake db:initial_setup
It's failing when trying to apply the "EnsureDummyCourse" migration:
[...]
== EnsureDummyCourse: migrating ==============================================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `global_id' for nil:NilClass
/var/www/canvas/lib/feature_flags.rb:107:in `map'
/var/www/canvas/lib/feature_flags.rb:107:in `block (3 levels) in feature_flag_account_ids'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/cache.rb:332:in `block in fetch'
/var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/cache.rb:717:in `block in save_block_result_to_cache'
[...]
Not sure if this is something I'm overlooking or have missed, but I have retried from scratch numerous times and am getting stuck in the exactly the same place...
@trangmx:
Hope someone has a better solution! You could install the
pulsar-client
gem build dependencies instead of using--without pulsar
. I think only the devel library is required, but I installed both (pulsar-client
&pulsar-client-dev
) and that worked fine.@anestores and @trangmx - Have either of you managed to successfully complete the build? The step I'm getting stuck on is:
RAILS_ENV=production bundle exec rake db:initial_setup
It's failing when trying to apply the "EnsureDummyCourse" migration:
[...] == EnsureDummyCourse: migrating ============================================== rake aborted! StandardError: An error has occurred, this and all later migrations canceled: undefined method `global_id' for nil:NilClass /var/www/canvas/lib/feature_flags.rb:107:in `map' /var/www/canvas/lib/feature_flags.rb:107:in `block (3 levels) in feature_flag_account_ids' /var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/cache.rb:332:in `block in fetch' /var/www/canvas/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.7/lib/active_support/cache.rb:717:in `block in save_block_result_to_cache' [...]
Not sure if this is something I'm overlooking or have missed, but I have retried from scratch numerous times and am getting stuck in the exactly the same place...
the same to you..
@JedMeister
I had the same issue. In feature_flag.rb I changed line 105 from chain = account_chain(include_site_admin: true)
to chain = account_chain(include_site_admin: false)
and run initial setup. This way I was able to create admin account, then revert changes and run initial setup again with no problem. But I am not sure how good of a solution this is.
Thanks for sharing your workaround @Gustav14.
Although, yesterday I also posted in the canvas-lms-users
group. And I got a response (I assume from one of the devs?) who said:
Hi Jeremy, thanks for the report and sorry for the trouble. It’s a bug that snuck through our testing and we’re working on a fix, but for I believe you should be able to comment out the line (around 249 in app/models/course.rb) that says "after_create :copy_from_course_template”. And that should get the migration past that error.
I tried the suggested solution (commenting out the after_create :copy_from_course_template
line) and it indeed worked!
Canvas no longer depends on the pulsar-client gem (since Jan. 2022). For other issues getting Canvas up and running, please use the Google Group.
The following error occurs following the "Production Start" instructions.
In the "Bundler and Canvas Dependencies" Section after executing the command:
"bundle 2.2.15 install --path vendor/bundle"
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /var/canvas/vendor/bundle/ruby/2.6.0/gems/rice-2.2.0 /usr/bin/ruby2.6 -I /usr/lib/ruby/2.6.0 -r ./siteconf20210525-15211-aq5dbz.rb extconf.rb bootstrap: 4: bootstrap: autoreconf: not found post-autoconf.rb:6:in'
Post-processing configure
sh: 0: Can't open configure
Makefile not found
Gem files will remain installed in /var/canvas/vendor/bundle/ruby/2.6.0/gems/rice-2.2.0 for inspection.
Results logged to /var/canvas/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/rice-2.2.0/gem_make.out
An error occurred while installing rice (2.2.0), and Bundler cannot continue.
Make sure that
initialize': No such file or directory @ rb_sysopen - configure (Errno::ENOENT) from post-autoconf.rb:6:in
open' from post-autoconf.rb:6:inprocess' from post-autoconf.rb:16:in
gem install rice -v '2.2.0' --source 'https://rubygems.org/'
succeeds before bundling. In Gemfile: pulsar-client was resolved to 2.6.1.pre.beta.2, which depends on riceRecreated using the following versions of Ubuntu: 14.04 and 16.04LTS.