Code Monkey home page Code Monkey logo

Comments (6)

AlexWayfer avatar AlexWayfer commented on August 16, 2024 1

Either way the README does say this is possible, so I guess I need to figure out if I should remove that or figure out how to make this work with rbenv.

Great, thanks.

Yes, migrating may be painful, but let's don't say that it's possible in the README if we don't have a way to do this simple.

from asdf-ruby.

tuxagon avatar tuxagon commented on August 16, 2024 1

I want to add to this conversation because I vote for the rubies section being replaced in the README due to it being wrong. I ran the

mkdir ~/.asdf/installs/
mv ~/.rbenv/versions/* ~/.asdf/installs/ruby/

from the README and the output of gem environment was still using the .rbenv routes to reference gems despite shims being there to use the .asdf binaries. I had to run

asdf install ruby 2.4.2
asdf reshim ruby
gem install bundler

I found out that the values from gem environment were baked into the ruby build that the install performed. I'm not sure there will be a trustworthy way to just shim the versions from these other version managers. It's plausible that gems could be copied over, but it's probably not worth it by going through back channels like this just to be "compatible". I think understanding the legacy .ruby-version file is invaluable, but just copying over versions caused me, personally, some pain to figure out how to fix everything.

If the goal is to simplify the migration, then there probably is a way that the gems could be cached to have them be installed as part of the install process for a new ruby version, working kind of like the .default-gems file.

I hope this is helpful.

from asdf-ruby.

AlexWayfer avatar AlexWayfer commented on August 16, 2024

I confirm, output like this:

> gem list
/home/alex/.asdf/bin/private/asdf-exec: /home/alex/.asdf/installs/ruby/2.5.1/bin/gem: /home/alex/.rbenv/versions/2.5.1/bin/ruby: bad interpreter: No such file or directory
/home/alex/.asdf/bin/private/asdf-exec: line 52: /home/alex/.asdf/installs/ruby/2.5.1/bin/gem: Success

from asdf-ruby.

Stratus3D avatar Stratus3D commented on August 16, 2024

I honestly don't think it is wise to try to migrate all your Rubies from other Ruby version managers into asdf-ruby this way. It seems like there too many places for hard coded paths to hide to make it worth while. Ruby was compiled for that specific directory, and moving it is bound to create headaches.

Either way the README does say this is possible, so I guess I need to figure out if I should remove that or figure out how to make this work with rbenv.

from asdf-ruby.

Stratus3D avatar Stratus3D commented on August 16, 2024

Based on this discussion I've removed section in the readme on migrating rubies from other version managers. It will take longer to reinstall them, but it's easier than having to deal with rubies that contain hardcoded paths and cannot easily be migrated.

from asdf-ruby.

AlexWayfer avatar AlexWayfer commented on August 16, 2024

Based on this discussion I've removed section in the readme on migrating rubies from other version managers. It will take longer to reinstall them, but it's easier than having to deal with rubies that contain hardcoded paths and cannot easily be migrated.

OK, thank you.

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.