I want to apply this theme, but there is an error while building it.
It works in local, but it doesn't build.
https://github.com/rubygems/bundler/issues/4375
I saw it through this link, but I don't know how to match it because the server also says that using a fixed version of the bundler is the solution.
Error: The process '/opt/hostedtoolcache/Ruby/3.1.2/x64/bin/bundle' failed with exit code 16
at ExecState._setResult (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:6023:25)
at ExecState.CheckComplete (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:6006:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:5900:27)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
$ which jekyll
>>> /Users/GyeongminKim/.rbenv/shims/jekyll
$ which gem
>>> /Users/GyeongminKim/.rubies/ruby-3.1.2/bin/gem
$ which bundle
>>> /Users/GyeongminKim/.rubies/ruby-3.1.2/bin/bundle
$ bundle version
>>> Bundler version 2.3.7 (2022-09-15 commit unknown)
$ ruby --version
>>> ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
I was getting the same error. This command helped me to resolve my issue:
bundle lock --add-platform x86_64-linux
source
Today, I've been trying to configure Dokku to deploy a statically-generated website of mine (built with middleman): push the middleman source to the host, generate the website on the host, and tell a nginx to serve those static files.
Following these resources 1 and 2, I setup my project with:
a .buildpacks file, containing one buildpack to build the site, and the nginx buildpack to serve the generated static HTML files:
https://github.com/heroku/heroku-buildpack-ruby.git#v222
https://github.com/dokku/buildpack-nginx.git#v14
a .static file so that the nginx buildpack knows it must serve a static website
a predeploy action in charge of building the site, using app.json :
{
"scripts": {
"dokku": {
"predeploy": "bundle exec middleman build",
}
}
}
What happened?
Apparently, at the moment I'm trying to build my middleman site with the predeploy hook, the bundle command is not available anymore. Here's an example output I'm getting:
➜ git push dokku master
Enumerating objects: 397, done.
Counting objects: 100% (397/397), done.
Delta compression using up to 8 threads
Compressing objects: 100% (258/258), done.
Writing objects: 100% (397/397), 819.50 KiB | 14.90 MiB/s, done.
Total 397 (delta 195), reused 244 (delta 111), pack-reused 0
remote: Resolving deltas: 100% (195/195), done.
-----> Cleaning up...
-----> Building site from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: multi ruby static
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby
-----> Installing bundler 2.1.4
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rack
-----> Using Ruby version: ruby-2.6.3
-----> Installing dependencies using bundler 2.1.4
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
Using concurrent-ruby 1.1.7
Using i18n 0.9.5
Using minitest 5.14.2
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using activesupport 5.2.4.4
Using public_suffix 4.0.6
Using addressable 2.7.0
Using execjs 2.7.0
Using autoprefixer-rails 9.8.6.5
Using backports 3.18.2
Using bundler 2.1.4
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using contracts 0.13.0
Using dotenv 2.7.6
Using erubis 2.7.0
Using fast_blank 1.0.0
Using fastimage 2.2.0
Using ffi 1.13.1
Using temple 0.8.2
Using tilt 2.0.10
Using haml 5.2.0
Using hamster 3.0.0
Using hashie 3.6.0
Using rexml 3.2.4
Using kramdown 2.3.0
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using listen 3.0.8
Using memoist 0.16.2
Using thor 1.0.1
Using middleman-cli 4.3.11
Using padrino-support 0.13.3.4
Using padrino-helpers 0.13.3.4
Using parallel 1.19.2
Using rack 2.2.3
Using sassc 2.4.0
Using servolux 0.13.0
Using uglifier 3.2.0
Using middleman-core 4.3.11
Using middleman 4.3.11
Using middleman-autoprefixer 2.10.1
Bundle complete! 3 Gemfile dependencies, 43 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into `./vendor/bundle`
Bundle completed (0.52s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Installing node-v12.16.2-linux-x64
-----> Detecting rake tasks
###### WARNING:
No Procfile detected, using the default web server.
We recommend explicitly declaring how to boot your server process via a Procfile.
https://devcenter.heroku.com/articles/ruby-default-web-server
=====> Downloading Buildpack: https://github.com/dokku/buildpack-nginx.git
=====> Detected Framework: .static
-----> Copy static files to www
-----> Reusing nginx binary from cache
-----> Using default app-nginx.conf.sigil
-----> Using default mime.types
Using release configuration from last framework (.static).
-----> Discovering process types
Default types for -> web
-----> Releasing site...
-----> Deploying site...
-----> Checking for predeploy task
-----> Executing predeploy task from app.json: bundle exec middleman build
=====> Start of site predeploy task (22fcf68dd) output
remote: ! Execution of predeploy task failed: bundle exec middleman build
/bin/bash: bundle: command not found
remote: 2021/01/02 15:06:19 exit status 1
remote: 2021/01/02 15:06:19 exit status 1
remote: 2021/01/02 15:06:19 exit status 1
=====> End of site predeploy task (22fcf68dd) output
To host:site
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'host:site'
What I tried
I noticed the first buildpack is executed, then the second one, then the predeploy hook kicks in.
I tried removing the nginx "static serve" buildpack and keep only the ruby one, and keep a bundle command in my predeploy hook. It worked and I didn't get the "command not found" error. So switching to the second buildpack seems to be messing things up for me.
I compared the path with and without the nginx "static serve" buildpack, and nothing weird. With the nginx buildpack, a new path is added but the previously set ruby paths are still there:
# with only ruby buildpack
/app/bin:/app/vendor/bundle/bin:/app/vendor/bundle/ruby/2.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# with both ruby & nginx buildpacks
/app/bin:/app/vendor/bundle/bin:/app/vendor/bundle/ruby/2.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app/nginx
Eventually, I'm a bit lost here. Is it expected? Am I not following the dokku way? Am I getting this because of permissions issues, or something in Dokku that I'm not aware of?
For now, as a fallback, I'm serving the site by running a middleman server that receives all requests, but it makes no sense to dynamically serve a statically-generated website.
Thanks to jonrsharpe comment, I reoriented my searches and found this blog post on heroku engineering blog. Eventually, as stated by jonrsharpe:
The Nginx buildpack won't have Ruby in at all - you need to do any building in the Ruby buildpack context, so all the static buildpack needs to do is serve the results.
Therefore, to launch my middleman build command, I needed to hook somewhere in the ruby buildpack thing. And in the "jekyll on heroku" link, everything is explained: one should override the assets:precompile rake task.
Steps I followed
Add gem "rake" to my Gemfile (and bundle, of course)
Create a Rakefile with the assets:precompile task :
task "assets:precompile" do
exec("middleman build")
end
Enjoy!
I downloaded the latest master of https://github.com/dji-sdk/Mobile-UXSDK-iOS (should be 4.11.1), installed the pods and inserted the Bundle Identifier and the App Key.
when compiling I get the error:
Mobile-UXSDK-iOS/Sample Code/SwiftSampleCode/UXSDKSwiftSample/MapWidget/CustomMapViewController.swift:10:8: No such module 'iOS_Color_Picker'
my pod install looked successful:
pod install
Analyzing dependencies
Downloading dependencies
Installing DJI-SDK-iOS (4.11.2)
Installing DJI-UXSDK-iOS (4.11.1)
Installing DJIFlySafeDatabaseResource (01.00.01.17)
Installing DJIWidget (1.6.2)
Installing iOS-Color-Picker (1.2)
Generating Pods project
Integrating client project
can anyone assist me on this error?
thanks a lot
used workspace file and all works
I am trying to set up a virtual machine running a Liberty profile server with a sample application deployed following the instructions given in this link : https://developer.ibm.com/wasdev/docs/getting-started-chef-cookbooks-liberty-profile/
But instead of using vagrant, I use an EC2 instance as a virtual machine. I get the following error when I ssh and run "sudo chef-client" in the virtual machine.
Starting Chef Client, version 12.5.1
resolving cookbooks for run list: ["apt", "starter::JSPExamples"]
Synchronizing Cookbooks:
- starter (1.0.0)
- apt (2.9.2)
- application (5.0.0)
- poise-service (1.0.2)
- application_wlp (0.2.0)
- wlp (0.3.0)
- java (1.36.0)
- poise (2.4.0)
Compiling Cookbooks...
[2015-11-12T10:20:23+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is deprecated, use Chef::DSL::IncludeRecipe instead.
[2015-11-12T10:20:23+00:00] WARN: Called from: /var/chef/cache/cookbooks/application_wlp/providers/wlp_application.rb:20:in `class_from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:42:in `class_eval'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:42:in `class_from_file'
=======================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/application_wlp/resources/wlp_application.rb
=======================================================================
LoadError
---------
cannot load such file -- ApplicationCookbook
Kindly help me out.
The application cookbook recently released a new major version (5.0.0) which is not backwards compatible with the earlier releases. The tutorial you are following is out of date and needs to be updated. In the short term you can probably fix your issue by explicitly downloading the last 4.x version of the application cookbook from https://supermarket.chef.io/.
We are downloading the latest Cordova documentation and want to generate it with Jenkins.
We are using RVM to manage the Ruby instances.
Here is the relevant shell execution in the Jenkins job.
#!/bin/bash
source "$HOME/.rvm/scripts/rvm"
echo "====== Setting up ruby ========================================"
rvm use "1.7.8"
set -e
echo "====== Installing cordova docs dependencies ==================="
gem install bundler
gem install nokogiri
cd "${WORKSPACE}/submodule_apache_cordova_docs"
bundle install
cd -
echo "====== Generating documents ==================================="
rvm current
ruby -v
${WORKSPACE}/submodule_apache_cordova_docs/bin/generate
and this is the output for that section
[workspace] $ /bin/bash /tmp/hudson1421417307959072745.sh
====== Setting up ruby =====================================
Using /var/lib/jenkins/.rvm/gems/jruby-1.7.8
====== Installing cordova docs dependencies ================
Successfully installed bundler-1.7.2
1 gem installed
Successfully installed nokogiri-1.6.3.1-java
1 gem installed
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using json 1.8.1
Using nokogiri 1.5.9
Using rspec 1.3.0
Using bundler 1.7.2
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
/var/lib/jenkins/jobs/Build-Documentation/workspace
====== Generating documents ================================
jruby-1.7.8
jruby 1.7.8 (1.9.3p392) 2013-11-14 0ce429e on OpenJDK 64-Bit Server VM 1.7.0_65-b32 [linux-amd64]
SyntaxError: /var/lib/jenkins/jobs/Build-Documentation/workspace/submodule_apache_cordova_docs/bin/../lib/cordova/jodoc.rb:28: syntax error, unexpected tCONSTANT
#template_directories = [ File.join TEMPLATE_PATH, 'default' ]
^
require at org/jruby/RubyKernel.java:1084
require at /var/lib/jenkins/.rvm/rubies/jruby-1.7.8/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at /var/lib/jenkins/.rvm/rubies/jruby-1.7.8/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53
(root) at /var/lib/jenkins/jobs/Build-Documentation/workspace/submodule_apache_cordova_docs/bin/../lib/docs_generator.rb:1
require at org/jruby/RubyKernel.java:1084
(root) at /var/lib/jenkins/jobs/Build-Documentation/workspace/submodule_apache_cordova_docs/bin/../lib/docs_generator.rb:26
(root) at /var/lib/jenkins/jobs/Build-Documentation/workspace/submodule_apache_cordova_docs/bin/generate:22
Build step 'Execute shell' marked build as failure
Finished: FAILURE
As far as I can see all the dependency versions are correct, including Ruby.
This is the file that errors: https://github.com/apache/cordova-docs/blob/master/lib/cordova/jodoc.rb
What is causing the error?
Thanks