-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rehash problem with rubinius master #178
Comments
I've noticed the same issue. I compiled/installed Rubinius, then installed bundler into Rubinius's gems, and ran |
+1 here, but I guess I found the reason. |
Here's a rough solution for this problem: assuming you are using rubinius 1.9 mode (-X19), just create the file if [ ! -x "$RBENV_COMMAND_PATH" ] && [ "$RBENV_VERSION" = "rbx-2.0.0-dev" ]; then
export RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/1.9/bin/${RBENV_COMMAND}"
fi |
The previous comment solves the problem only if other ruby version have the gem you want to use (bundler in this case), otherwise the shims for Rubinius won't be created. For a complete fix, besides the previous file, create a file named make_shims ~/.rbenv/versions/rbx-2.0.0-dev/1.9/bin/* |
Why in the world does Rubinius create a |
According to @evanphx, it separates the gems and gems stubs installed in 1.8 and 1.9 modes. |
So if you installed Rubinius into /usr/local you'd have a /usr/local/1.9 directory on your system afterwards? Insanity. If Rubinius is going to completely eschew Unix convention like that then I guess someone will have to write an rbenv plugin to support it. |
It creates |
So it just overrides the RubyGems executable directory then? |
@sstephenson If you install rubinius into /usr/local, there won't be a /usr/local/1.9/bin. The 1.9 directory is under the data directory for rubinius, which will be /usr/local/rubinius/gems/1.9/bin. If you see it installing into /usr/local/1.9, thats a bug. |
@sstephenson Yes, Rubinius never puts bin stubs into public directories like /usr/local/bin, etc because they'd too easily conflict with other rubies. |
Rubinius intends for the binstubs to almost always be accessed via -S, but you may put the internal gems/1.9/bin path in your PATH if you wish. |
Thanks for the clarification. |
Just run into the same issue. The fix by @samflores doesn't work for me and looks like a temporary solution. Any chance to get a proper fix? I'm not able to say it's a rbenv issue if @sstephenson thinks it's not something that can be fixed here we should find another way. |
OK, sorry for the noise. The suggested fix works just fine. Well, @sstephenson should we go for a plugin? I can do that... |
@lucapette, it'd be great if you could explore a plugin. |
Would love some feedback on this plugin https://github.com/collinschaafsma/rbenv-rbx_2.0.0-dev_fix to fix the problem based off of @samflores suggestions. I'm not really sure what best practices are for rbenv plugin development, but this does fix the problem for me. thanks. |
@collinschaafsma it looks fine, but I'd use |
@collinschaafsma The latest rbx master might have changed. Your plugin is looking for rbx-2.0.0-dev/gems/1.9/bin/ but a fresh install of rubinus for me (via ruby-build) doesn't have that anymore. Anyone know what's changed or what I did wrong? |
@samflores good idea! I just pushed up the change. Thanks. @ashb not sure, I tried this 3 days ago. Don't see anything that has changed in the commit history for rbx that would change the path like that. I didn't install from ruby-build, I just configured and compiled into my versions directory like so. |
Anything like that plugin for rubinius 1.2.4? I'm having the same issue. |
@collinschaafsma thanks for your plugin. I can now play with rbx 2 in 1.9 mode, puma, celluloid and sidekiq. |
This hasn't been touch in 4 months and is still a problem. Is there something that can actually be done, or do we just use those two files? They are kind of annoying since you can't switch between 18 and 19 mode. Is there anything I can do to help? |
@collinschaafsma Thanks! Your plugin worked for me! |
This was solved as a plugin and is too specific to Rubinius to be handled from rbenv itself. I've documented the caveat in the wiki and will go ahead and close the issue now because the problem is pretty much solved. Yes, it will still probably bite some people in the future, but we believe that's a problem of Rubinius not rbenv. Hopefully they'll search for solutions and find either the plugin or our wiki page. |
I ran into this same issue with rbenv and rubinius earlier today, but also ran into some problems with the I decided to fork and release a somewhat more official rbenv-rbx plugin. The goal is to support varying rbx 2.0+ versions in both 1.8 or 1.9 mode. Please give is a test. Contributions are welcome. |
Seems to still be an issue for me and the plugin hasn't helped either. Suggestions? |
@mhenrixon: how did you install rbx? Which version? Which Ruby mode you're running in (1.8, 1.9, 2.0)? Which plugin didn't work for you? |
I'm also having this issue. Is there anything I can do to investigate ? |
It was solved with rbenv/ruby-build#419 |
Rubinius 2.0 configures RubyGems to install gem binstubs in `PREFIX/gems/bin` instead of just `PREFIX/bin`. The reason given by evanphx is that Rubinius wants to avoid RubyGems' binstubs conflating with those from other Rubies. http://git.io/XBWGew Fixes #178
Rubinius 2 insists that it installs RubyGems binstubs into `PREFIX/gems/bin` instead of `PREFIX/bin`. This creates complexity for rbenv rehash and exec processes, so we symlink `gems/bin` into `bin` and have RubyGems create binstubs at a location that is consistent with other Ruby implementations. See rbenv/rbenv#178, rbenv/rbenv#461
Hello,
I'm trying to get rubinius to work with rbenv but I'm having no luck with that.
What i did is:
What i get is :
rbenv: bundle: command not found
The `bundle' command exists in these Ruby versions:
1.9.2-p290
1.9.3-p0
1.9.3-preview1
rbx-1.2.4
I tried running bundle install from the gem folder with
~/.rbenv/versions/rbx-2.0.0-dev/gems/1.9/gems/bundler-1.0.21/bin/bundle install
and it worked (although it gave an error installing a gem, but that's not rbenv's fault).
Anyone has an idea on what's going on?
Thanks a lot
Marco
The text was updated successfully, but these errors were encountered: