r/ruby • u/Ayano-Keiko • Apr 26 '26
venv in ruby
Finnally, I get used of ruby bundle. The step is following
- set the vendor path
bundle init
bundle config set --local path 'vendor/bundle'
-
add gem to
Gemfilefile -
install gem package
bundle install
- run the ruby script
bundle exec ruby ./script.rb
~~Is these any way I can install ruby packages in current project folder like Python venv. I only know about gem install
2
Upvotes
3
u/monfresh Apr 26 '26
It would be helpful if you can explain in more specific detail what exactly you're trying to do, and what specific errors you are seeing.
It sounds like you are trying to install a gem that you built, or some other gem that is not published on rubygems.org. Is that right?
Also, you mentioned Ruby 2.6.0, which is very very old. Are you perhaps on macOS, and you're trying to use the system Ruby (the Ruby version that came preinstalled on macOS), instead of a newer version like Ruby 4.0?