Giter VIP home page Giter VIP logo

Comments (4)

Stratus3D avatar Stratus3D commented on August 14, 2024

Now when I am trying to run it as background process gem intall rake it will not work.

Can you provide details on this? How did it not work? Did it print an error?

Also, how did you run it as a background process?

from asdf-ruby.

nikhilbhatt avatar nikhilbhatt commented on August 14, 2024

Error log for the bundle install
I just updated actual path with $HOME in logs.

Errno::ENOENT: No such file or directory - asdf
  $HOME/.asdf/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:5:in ``'
  $HOME/.asdf/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:5:in `install'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/installer.rb:89:in `block in run'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/process_lock.rb:12:in `block in lock'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/process_lock.rb:9:in `open'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/process_lock.rb:9:in `lock'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/installer.rb:71:in `run'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/installer.rb:23:in `install'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/cli/install.rb:62:in `run'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/cli.rb:261:in `block in install'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/settings.rb:130:in `temporary'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/cli.rb:260:in `install'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/cli.rb:34:in `dispatch'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/cli.rb:28:in `start'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/exe/bundle:37:in `block in <top (required)>'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
  $HOME/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.19/exe/bundle:29:in `<top (required)>'
  $HOME/.asdf/installs/ruby/3.1.2/bin/bundle:25:in `load'
  $HOME/.asdf/installs/ruby/3.1.2/bin/bundle:25:in `<main>'

Also, how did you run it as a background process?

I am using chef to run bundle install.
command ran -> $HOME/.asdf/shims/bundle install

from asdf-ruby.

Stratus3D avatar Stratus3D commented on August 14, 2024

You should never invoke shims directly. Instead of $HOME/.asdf/shims/bundle install you should run bundle install or asdf exec bundle install. Regardless, the asdf code will determine the version by looking at the directory the command was invoked in.

I don't know where Chef is invoking your bundle install command, but if you don't have a Ruby version set for that directory in asdf it won't work and would typically print a message like this:

unknown command: shellcheck. Perhaps you have to reshim?

It's not clear to me what the stacktrace above means, as that's not from asdf, but I'd double check that you've followed all the steps in the asdf installation instructions.

from asdf-ruby.

nikhilbhatt avatar nikhilbhatt commented on August 14, 2024

It's different error, Actually I got this working after loading up the environment variables when running the command,

from asdf-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.